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,MAILING_LIST_MULTI, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,dbaf05888e191cb6 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-01-15 08:29:04 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!freenix!enst.fr!not-for-mail From: sk Newsgroups: comp.lang.ada Subject: Re: Access to array slices? Date: Wed, 15 Jan 2003 10:31:18 -0600 Organization: ENST, France Sender: comp.lang.ada-admin@ada.eu.org Message-ID: References: <5ad0dd8a.0301141717.2f1a9685@posting.google.com> <1l4V9.55183$Dn.10134@sccrnsc03> Reply-To: comp.lang.ada@ada.eu.org NNTP-Posting-Host: marvin.enst.fr Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Trace: avanie.enst.fr 1042648143 48390 137.194.161.2 (15 Jan 2003 16:29:03 GMT) X-Complaints-To: usenet@enst.fr NNTP-Posting-Date: Wed, 15 Jan 2003 16:29:03 +0000 (UTC) Return-Path: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20020828 X-Accept-Language: en-us, en Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org X-Mailman-Version: 2.0.13 Precedence: bulk List-Unsubscribe: , List-Id: comp.lang.ada mail<->news gateway List-Post: List-Help: List-Subscribe: , Errors-To: comp.lang.ada-admin@ada.eu.org X-BeenThere: comp.lang.ada@ada.eu.org Xref: archiver1.google.com comp.lang.ada:33040 Date: 2003-01-15T10:31:18-06:00 Hi, tmoran@acm.org wrote: > type C_Char_Ptrs is access all Interfaces.C.Char; > > type C_String_Ptrs is access all > Interfaces.C.Char_Array(Interfaces.C.Size_T); > -- a pointer to a fixed size (albeit huge) char_array > > function Convert is new Ada.Unchecked_Conversion > (Source=>C_Char_Ptrs, Target=>C_String_Ptrs); I am curious as to whether you deliberately avoided Interfaces.C.Strings (ICS) or the not mentioning it was an oversight ? The reason I ask is that I have not seen your technique and was wondering if you found it more useful and transparent than ICS ? An example of why I ask, int readlink(const char *path, char *buf, size_t bufsiz); Path => ICS.Chars_Ptr however Buf => access IC.Char_Array The choice seems dependent upon whether the imported function allocates or expects the caller to allocate. Do you deliberately avoid ICS and does your method add some uniformity when binding ? -- -- -- Merge vertically for real address -- ------------------------------------ -- s n p @ t . o -- k i e k c c m ------------------------------------