From: "Matthew Heaney" <matthew_heaney@acm.org>
Subject: Re: Representation question (void *)
Date: 1999/11/17
Date: 1999-11-17T00:00:00+00:00 [thread overview]
Message-ID: <3832e3e1_2@news1.prserv.net> (raw)
In-Reply-To: 7E47A2C771ADD211AD3C00A0C960172D01269B57@ISCPORTSEX
In article <7E47A2C771ADD211AD3C00A0C960172D01269B57@ISCPORTSEX> ,
"Lipscomb, Kevin" <KLipscomb@C2CEN.USCG.mil> wrote:
> How would one represent the following C declaration in Ada 95?
>
> void *data;
>
> Is this just a placeholder for a pointer that should never be referenced?
Type void_ptr needs to be in Interfaces.C, but it isn't right now. In
the meantime, just use type System.Address.
Data : Address;
If you know the type of the data you're pointing to, then you can
declare an actual access type, and use a convention pragma:
type whatever is ...
type Whatever_Ptr is access all Whatever;
pragma Convention (C, Whatever_Ptr);
--
Evolution is "only" a theory? "Creationism is not *even* a theory,
because its proponents have decided in advance that no amount of
evidence will change their beliefs."
Steve Walsh and Thomas Demere, "Facts, Faith, and Fairness"
next prev parent reply other threads:[~1999-11-17 0:00 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-11-16 0:00 Representation question (void *) Lipscomb, Kevin
1999-11-16 0:00 ` David C. Hoos, Sr.
1999-11-17 0:00 ` Ehud Lamm
1999-11-16 0:00 ` Keith Thompson
1999-11-17 0:00 ` tmoran
1999-11-17 0:00 ` Matthew Heaney [this message]
1999-11-17 0:00 ` Robert Dewar
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox