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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fc7fc1b95198137d X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-10-29 12:22:54 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Matthew Heaney" Newsgroups: comp.lang.ada Subject: Re: Ada Address = C pointer ? Date: Mon, 29 Oct 2001 15:19:00 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4807.1700 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4807.1700 X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:15372 Date: 2001-10-29T15:19:00-05:00 List-Id: "M. A. Alves" wrote in message news:mailman.1004357020.21840.comp.lang.ada@ada.eu.org... > You mean use Address_To_Access conversion? Because what I have is C > pointers I need to interface with. I am using Chars_Ptr because it has a > Null_Ptr value and I need to test for, and pass, NULL. (And in C char * > is assuredly able to point to anything.) But I am indeed considering > using Address et al., and Address to Access conversion. The Ada type that corresponds to the C type char* is Interfaces.C.Strings.chars_ptr. This is enunciated explicitly in RM95 B.3.1 (1) and (22). Unfortunately, there is no binding to the C type void* -- this was omitted from the standard (I assume by accident). I assume that there will be a binding to void* in Ada0Y. I think it's safe to assume that void* is the same as char*, so you should be OK using C.Strings.chars_ptr where a void* is expected. I do NOT think you need to use System.Address and Addr_To_Acc_Conv. The types declared in C.Strings should be adequate. That being said, I would be very surprised if System.Address had a different representation from char* or void*.