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,1e82cb45ab839370 X-Google-Attributes: gid103376,public From: Tucker Taft Subject: Re: Interfaces.C and void * Date: 1999/09/22 Message-ID: <37E90F43.C65F6703@averstar.com>#1/1 X-Deja-AN: 528299155 Content-Transfer-Encoding: 7bit Sender: news@inmet.camb.inmet.com (USENET news) X-Nntp-Posting-Host: houdini.burl.averstar.com References: <87btavxw93.fsf@deneb.cygnus.argh.org> X-Accept-Language: en Content-Type: text/plain; charset=us-ascii Organization: AverStar (formerly Intermetrics) Burlington, MA USA Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-09-22T00:00:00+00:00 List-Id: Florian Weimer wrote: > > Recently, I wrote a binding for a C library which provides an abstract > data type and completely hides the underlying representation of the type > (i.e., all the public routines work on pointers to void). > > Is there really no portable equivalent of a C void * in Interfaces.C? > I used Interfaces.C.Strings.chars_ptr, which should be quite portable in > practice, but AFAIK, ISO C doesn't require the representation of void * > and char * to be identical. Adding a void_ptr to Interfaces.C would seem like a reasonable addendum to the standard. In the interim, I would define a type in your own code, such as: type Void_Ptr is private; ... type Void_Ptr is new System.Address; This way, you will only need to change the definition in one place if that becomes necessary (which I doubt, in practice). -- -Tucker Taft stt@averstar.com http://www.averstar.com/~stt/ Technical Director, Distributed IT Solutions (www.averstar.com/tools) AverStar (formerly Intermetrics, Inc.) Burlington, MA USA