comp.lang.ada
 help / color / mirror / Atom feed
* Ada to C Interface: Passing Pointers Via System.Address
@ 2005-01-12  2:16 ReversedBias
  2005-01-12  3:09 ` tmoran
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: ReversedBias @ 2005-01-12  2:16 UTC (permalink / raw)


I am relatively new to Ada.  I am constructing an API so that my Ada
clients can talk to my C code.  My C functions return pointers to data
structures (very large structures).  I need to then pass the pointer to
the data struct to the Ada code and back into other C functions.  There is
no interaction with the data structure in the Ada code except to pass the
pointer from one C function to another.  I have been trying to use the C
interface pragma and return the pointers from C into an Ada System.Address
and then pass that System.Address into the another pragma back down to the
C functions.  My hope is that the C will be able to type cast the address
back into the correct pointer type.  So far I have not been able to get
this to work properly.  Please advise on another approach or post an
example of how I could do this using the System.Address

Thanks,




^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2005-01-13 17:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-01-12  2:16 Ada to C Interface: Passing Pointers Via System.Address ReversedBias
2005-01-12  3:09 ` tmoran
2005-01-12  7:36   ` ReversedBias
2005-01-12  8:38     ` tmoran
2005-01-12 15:50       ` Mark Lorenzen
2005-01-13 17:14   ` Martin Krischik
2005-01-13  1:25 ` Jeffrey Carter
2005-01-13  3:05 ` Steve

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