From: David Gressett <gressett@iglobal.net>
Subject: Newbie question about interface to C
Date: 2000/05/30
Date: 2000-05-30T00:00:00+00:00 [thread overview]
Message-ID: <gns8jskjjn1bp5etqp8k0qf5ou4civ54cr@4ax.com> (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.
next reply other threads:[~2000-05-30 0:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2000-05-30 0:00 David Gressett [this message]
2000-05-30 0:00 ` Newbie question about interface to C Keith Thompson
2000-05-31 0:00 ` Jeff Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox