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-Thread: 103376,47957cb8c33729e5 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: comp.lang.ada Subject: Re: Thick Ada bindings to C Win32 References: <2vjnfbF2lioiaU1@uni-berlin.de> <1Ucld.25101$KJ6.2286@newsread1.news.pas.earthlink.net> From: Brian May Date: Sun, 28 Nov 2004 10:56:29 +1100 Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.3 (gnu/linux) Cancel-Lock: sha1:Do7AreVOKBgluzd4MY8PHERbWNU= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: snoopy.microcomaustralia.com.au X-Trace: news.melbourne.pipenetworks.com 1101599768 202.173.153.89 (28 Nov 2004 09:56:08 +1000) X-Complaints-To: abuse@pipenetworks.com X-Abuse-Info: Please forward all headers to enable your complaint to be properly processed. Path: g2news1.google.com!news4.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!arclight.uoregon.edu!wn13feed!worldnet.att.net!216.196.98.144!border2.nntp.dca.giganews.com!nntp.giganews.com!news1.optus.net.au!optus!news.mel.connect.com.au!news-north.connect.com.au!news.alphalink.com.au!news.melbourne.pipenetworks.com!not-for-mail Xref: g2news1.google.com comp.lang.ada:6568 Date: 2004-11-28T10:56:29+11:00 List-Id: >>>>> "Jeffrey" == Jeffrey Carter writes: Jeffrey> I don't see that a copy is necessary: Jeffrey> Item_Buffer : aliased Buffer ...; You seem to be assuming I am using the thin layer directly in my program, in actual fact I have a thick layer: procedure Put(Handle : Handle_Type; Item : in Byte_Array) is Item_Buffer : aliased Buffer ...; begin ... end Put; I believe this does require a copy. I want a thick layer binding, so I have to option available to port code to Linux, should the need either occur, just be changing the serial IO module. I seem to remember that I encountered problems doing things as simply as you suggest, but I can't remember why nor can I imagine why - I will try it again and report back here with details of any errors encountered. -- Brian May