What is the best way to define the Imported C function
- From: qunying <zhu.qunying@xxxxxxxxx>
- Date: Fri, 25 Jan 2008 21:05:02 -0800 (PST)
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
.
- Follow-Ups:
- Re: What is the best way to define the Imported C function
- From: Jeffrey R. Carter
- Re: What is the best way to define the Imported C function
- From: Dmitry A. Kazakov
- Re: What is the best way to define the Imported C function
- From: Martin Krischik
- Re: What is the best way to define the Imported C function
- Prev by Date: Re: Test tool not only for Ada
- Next by Date: Re: Why I hate Gtk+/GNOME (from the perspective of an Ada supporter)
- Previous by thread: erreur de compilation !!
- Next by thread: Re: What is the best way to define the Imported C function
- Index(es):