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,8f7d6c5172a1d41b X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news1.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!local01.nntp.dca.giganews.com!nntp.scarlet.biz!news.scarlet.biz.POSTED!not-for-mail NNTP-Posting-Date: Wed, 24 Jan 2007 05:58:59 -0600 From: Ludovic Brenta Newsgroups: comp.lang.ada Subject: Re: [Revisited] How to get around "access type must not be outside generic unit" References: <3vwf1b4b2ntl$.l9n17zmh9v8a$.dlg@40tude.net> <1u2mhr9ypij4u.bn3yayn7o9l3$.dlg@40tude.net> Date: Wed, 24 Jan 2007 12:58:59 +0100 Message-ID: <87r6tkocu4.fsf@ludovic-brenta.org> User-Agent: Gnus/5.110006 (No Gnus v0.6) Emacs/21.4 (gnu/linux) Cancel-Lock: sha1:CKBfEiyLhlkQXtILokV9mRYuMaM= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 62.235.239.130 X-Trace: sv3-8e46Wrv9M+8muYMUpYWIwmq0CjLm9lZj+1vSdNHOWFiMnBAUt5/k1BnP7jPwDRSj/iiY6uPcyjFB5Lk!SpbwqLr0UF4APgwuQlXwEFP/cp407U9sr5kq5ttIYhuyCWuOBuesHvLehO1EiaJ0TNfPemp3mw8= X-Complaints-To: abuse@scarlet.be X-DMCA-Complaints-To: abuse@scarlet.biz X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.32 Xref: g2news2.google.com comp.lang.ada:8476 Date: 2007-01-24T12:58:59+01:00 List-Id: Dmitry A. Kazakov writes: > Let's take GtkAda as an example. The facts are: > > 1. It interfaces GTK+ (C++) No, GTK+ is written in C, even though it implements an object-oriented design. > 2. It is full of this > > package Glib is > ... > type Boxed_Copy is access > function (Boxed : System.Address) return System.Address; > pragma Convention (C, Boxed_Copy); > type Boxed_Free is access procedure (Boxed : System.Address); > pragma Convention (C, Boxed_Free); > > function Boxed_Type_Register_Static > (Name : String; > Copy : Boxed_Copy; > Free : Boxed_Free) return GType; > > How can I (well, ACT (:-)) apply Convention (C,...) on an anonymous > access type?! These are named access types, AFAICT. GNAT implements access types with convention C as C pointers; by contrast, access types with convention Ada may carry dope information. -- Ludovic Brenta.