From: qunying <zhu.qunying@gmail.com>
Subject: What is the best way to define the Imported C function
Date: Fri, 25 Jan 2008 21:05:02 -0800 (PST)
Date: 2008-01-25T21:05:02-08:00 [thread overview]
Message-ID: <5db8e5dd-9632-4aef-b1e3-8cc304bcd748@u10g2000prn.googlegroups.com> (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
next reply other threads:[~2008-01-26 5:05 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-26 5:05 qunying [this message]
2008-01-26 10:15 ` What is the best way to define the Imported C function 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
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox