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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,d23826ff0acb491b X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!postnews.google.com!l9g2000yqi.googlegroups.com!not-for-mail From: sjw Newsgroups: comp.lang.ada Subject: Re: Gem 39 - compiler specific? Date: Fri, 4 Sep 2009 15:41:43 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <9e0bbbcd-260f-48ed-8043-d6280c633e85@h3g2000yqa.googlegroups.com> <19268dbw82hf4.aii8as09aapk.dlg@40tude.net> <4bff103b-1797-4e2b-9dcf-7466b667c59b@d9g2000prh.googlegroups.com> <1s8kuin5t96vr$.1taw9mluqlplz$.dlg@40tude.net> <1bf4b63a-1e2d-41f1-97c6-8324d4b829ff@z3g2000prd.googlegroups.com> <6o3frhrv0n0p$.8wj0gszs5h07$.dlg@40tude.net> <1udpwiw4u1cj5$.ff4ssnbb90vn$.dlg@40tude.net> NNTP-Posting-Host: 82.30.110.254 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1252104103 15123 127.0.0.1 (4 Sep 2009 22:41:43 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Fri, 4 Sep 2009 22:41:43 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: l9g2000yqi.googlegroups.com; posting-host=82.30.110.254; posting-account=_RXWmAoAAADQS3ojtLFDmTNJCT0N2R4U User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_8; en-us) AppleWebKit/531.9 (KHTML, like Gecko) Version/4.0.3 Safari/531.9,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:8169 Date: 2009-09-04T15:41:43-07:00 List-Id: On Sep 4, 1:07=A0pm, Maciej Sobczak wrote: > I have done it very recently and I used > System.Address_To_Access_Conversions. The access values to genuine Ada > objects (even of class-wide types) are converted to addresses and > handed to the C++ component, which at some later point in time calls > back into Ada providing the previously stored address that Ada > converts to the original access value. > > A very important part of this business is that the C++ component > *never* uses the given address in any other way than to remember it. > It is just a "cookie". Then I don't quite see why you needed to convert at all? procedure P (Q : Fancy_Access); pragma Import (C, Q); Or is it that the size of a Fancy_Access makes it hard to represent on the C side?