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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8da8963fe574ea15,start X-Google-Attributes: gid103376,public From: David Gressett Subject: Newbie question about interface to C Date: 2000/05/30 Message-ID: #1/1 X-Deja-AN: 629276399 Content-Transfer-Encoding: 7bit Organization: Posted via Supernews, http://www.supernews.com Content-Type: text/plain; charset=us-ascii MIME-Version: 1.0 Newsgroups: comp.lang.ada X-Complaints-To: newsabuse@supernews.com Date: 2000-05-30T00:00:00+00:00 List-Id: I need to call C routines which are prototyped like these examples: shapelessblob *somefunction(char *s); /* creates a shaplessblob */ int otherfunction(shapelessblob *b); /* uses a shaplessblob */ where shaplessblob is a pointer to a structure that is created by somefunction. The calling Ada code will never look at the insides of a shapelessblob; It will only pass it to a C routine. How do I import such a pointer as an Ada access type? The Ada LRM that comes with gnat3.12p is not very helpful. (it is, after all, a RM, not a tutorial.) The Cohen book has only a single trivial example of a C interface.