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,start X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!news4.google.com!news.glorb.com!solnet.ch!solnet.ch!news-zh.switch.ch!switch.ch!cernne03.cern.ch!cern.ch!news From: Maciej Sobczak Newsgroups: comp.lang.ada Subject: Interfacing to C and void* Date: Mon, 20 Feb 2006 16:19:44 +0100 Organization: CERN - European Laboratory for Particle Physics Message-ID: NNTP-Posting-Host: abpc10883.cern.ch Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: sunnews.cern.ch 1140448783 12759 (None) 137.138.37.241 X-Complaints-To: news@sunnews.cern.ch User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.12) Gecko/20060203 Red Hat/1.7.12-1.1.3.4 X-Accept-Language: en-us, en Xref: g2news1.google.com comp.lang.ada:3014 Date: 2006-02-20T16:19:44+01:00 List-Id: 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. -- Maciej Sobczak : http://www.msobczak.com/ Programming : http://www.msobczak.com/prog/