comp.lang.ada
 help / color / mirror / Atom feed
* What is the best way to define the Imported C function
@ 2008-01-26  5:05 qunying
  2008-01-26 10:15 ` Martin Krischik
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: qunying @ 2008-01-26  5:05 UTC (permalink / raw)


Hi,

I am learning Ada and try to test the interface with C.

for this function, what is the best way to define the function in Ada?

int xcb_parse_display(const char *name, char **host, int *display, int
*screen);

function parse_display (Name : String; Host: ??; Display :
Integer_Ptr; Screen : Integer_Ptr) return Integer;
pragma Import (C, parse_display, "xcb_parse_display");

Where Integer_Ptr is access Integer;
How to define the type for char **?  Sould I use "type char_ptr_ptr is
access char_ptr;" where char_ptr is defined in Interfaces.C; or there
is a better way to do it?

Thanks





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

end of thread, other threads:[~2008-01-28 17:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-26  5:05 What is the best way to define the Imported C function qunying
2008-01-26 10:15 ` Martin Krischik
2008-01-26 16:24   ` qunying
2008-01-26 10:56 ` Dmitry A. Kazakov
2008-01-26 12:15   ` Stefan Lucks
2008-01-27  1:31 ` Jeffrey R. Carter
2008-01-28 17:18   ` Adam Beneschan

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