From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,7050446df2bdd3ac X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!news4.google.com!news.glorb.com!newsfeed.inode.at!news.hispeed.ch!linux2.krischik.com!news From: Martin Krischik Newsgroups: comp.lang.ada Subject: Re: Interfacing to C and void* Date: Mon, 20 Feb 2006 20:01:31 +0100 Organization: Cablecom Newsserver Message-ID: <1324118.dmjBZp3eKX@linux1.krischik.com> References: NNTP-Posting-Host: 84-74-134-212.dclient.hispeed.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: news.hispeed.ch 1140463832 17082 84.74.134.212 (20 Feb 2006 19:30:32 GMT) X-Complaints-To: news@hispeed.ch NNTP-Posting-Date: Mon, 20 Feb 2006 19:30:32 +0000 (UTC) User-Agent: KNode/0.10.1 Xref: g2news1.google.com comp.lang.ada:3019 Date: 2006-02-20T20:01:31+01:00 List-Id: Maciej Sobczak wrote: > Hi, > > Suppose I have the following two C functions: > > void * factory(); > void sink(void *p); > > I use them this way: > > void *someObject = factor(); > sink(someObject); > > > What is the recommended approach to interfacing to such functions from > Ada? I cannot find anything (in part B of AARM) that would help with > void*. Of course, I could wrap these functions into something that uses > long values (or some other tokens) and appropriate mapping at the level > of the wrapper, but I still hope there is more direct way. http://en.wikibooks.org/wiki/Ada_Programming/Memory#Where_is_void.2A.3F Martin -- mailto://krischik@users.sourceforge.net Ada programming at: http://ada.krischik.com