comp.lang.ada
 help / color / mirror / Atom feed
* Newbie question about interface to C
@ 2000-05-30  0:00 David Gressett
  2000-05-30  0:00 ` Keith Thompson
  2000-05-31  0:00 ` Jeff Carter
  0 siblings, 2 replies; 3+ messages in thread
From: David Gressett @ 2000-05-30  0:00 UTC (permalink / raw)


I need to call C routines which  are prototyped like these examples:

shapelessblob *somefunction(char *s);  /* creates a shaplessblob */

int otherfunction(shapelessblob *b);  /* uses a shaplessblob */

where shaplessblob is a pointer to a structure  that is created by
somefunction. The calling Ada code will never look at the insides of a
shapelessblob; It will only pass it to a C routine.

How do I import such a pointer as an Ada access type?

The  Ada LRM that comes with gnat3.12p is not very helpful. (it is,
after all, a RM, not a tutorial.) The Cohen book has only a single
trivial example of a C interface.






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

end of thread, other threads:[~2000-05-31  0:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-05-30  0:00 Newbie question about interface to C David Gressett
2000-05-30  0:00 ` Keith Thompson
2000-05-31  0:00 ` Jeff Carter

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