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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,e55ee29fd922b5bc,start X-Google-Attributes: gid103376,public From: William Starner Subject: Interfacing to void * Date: 1999/07/18 Message-ID: <37929901.649C0955@worldnet.att.net>#1/1 X-Deja-AN: 502581949 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii X-Complaints-To: abuse@worldnet.att.net X-Trace: bgtnsc01.worldnet.att.net 932354317 18496 208.252.201.221 (19 Jul 1999 03:18:37 GMT) Organization: AT&T WorldNet Services Mime-Version: 1.0 Reply-To: billeug@worldnet.att.net NNTP-Posting-Date: 19 Jul 1999 03:18:37 GMT Newsgroups: comp.lang.ada Date: 1999-07-19T03:18:37+00:00 List-Id: If I'm trying to interface to a C library that uses this struct struct BigNum { void *ptr; unsigned int size; unsigned int allocated; }; how should I interface to void*? I have private type voidpointer is access character; type BigNum is record ptr: voidpointer; size: Interfaces.C.unsigned; allocated: Interfaces.C.unsigned; end record; type RealBigNum is access BigNum; type UnboundedInt is new Linear with record Value: RealBigNum; end record; end nla23.linear.bnlib; but char* = void* is a C rule, not an Ada rule. It probably works, but it's not right. (I don't need to access anything through that pointer.)