* Re: Calling C function in Ada
[not found] <8qgon0$469$1@nnrp1.deja.com>
@ 2000-10-09 0:00 ` John McCabe
0 siblings, 0 replies; only message in thread
From: John McCabe @ 2000-10-09 0:00 UTC (permalink / raw)
ebresie@usa.net wrote:
> I am currently working on trying to have access to some of the protocol
>and service functions which are part of C and I think I am having some
>problems. I am still very new to using C functions in Ada..so it may
>just be a usage issue.
>
>How is the best way to handle the passing in of the char * type variabls
>and the char ** type variables?
Use Interfaces.C.Strings.chars_ptr and its associated operations for
char * stuff. You mention To_Ada, but you need to use function Value
to return a string, and function New_String to return a chars_ptr from
a string.
As for char **, I used an instantiation of Interfaces.C.Pointers.
Hope this helps.
Best Regards
John McCabe <john@assen.demon.co.uk>
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2000-10-09 0:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <8qgon0$469$1@nnrp1.deja.com>
2000-10-09 0:00 ` Calling C function in Ada John McCabe
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox