comp.lang.ada
 help / color / mirror / Atom feed
From: Jeffrey Carter <jeffrey.carter@boeing.com>
Subject: Re: Need help mapping a C struct to Ada
Date: Wed, 21 Mar 2001 22:21:15 GMT
Date: 2001-03-21T22:21:15+00:00	[thread overview]
Message-ID: <3AB9295B.DAE4F638@boeing.com> (raw)
In-Reply-To: WH7u6.40$Je5.495@newsfeed.slurp.net

"(null)" wrote:
> 
> I'm trying to call some C functions from my Ada program.  The C function
> prototype and data types are basically
> 
>   typedef struct {
>     some fields...
>   } element;
> 
>   typedef struct {
>           int      num_elements;
>      element  the_elements[0];

My C isn't very good, but isn't this the same as

   element* the_elements;

since you have to "manually allocate the memory"?

If so, then you should probably use an access type with convention C in
Ada.



  parent reply	other threads:[~2001-03-21 22:21 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-21 19:56 Need help mapping a C struct to Ada (null)
2001-03-21 21:25 ` tmoran
2001-03-22 20:53   ` tmoran
2001-03-21 22:21 ` Jeffrey Carter [this message]
2001-03-21 23:12   ` Florian Weimer
2001-03-30  5:59 ` David Thompson
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox