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=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: a07f3367d7,e51f94f876618e37 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.224.180.141 with SMTP id bu13mr6634835qab.2.1352494394217; Fri, 09 Nov 2012 12:53:14 -0800 (PST) Received: by 10.52.76.36 with SMTP id h4mr2664464vdw.17.1352494394192; Fri, 09 Nov 2012 12:53:14 -0800 (PST) Path: gf5ni18188417qab.0!nntp.google.com!c7no14742242qap.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Fri, 9 Nov 2012 12:53:13 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=206.53.78.59; posting-account=ShYTIAoAAABytvcS76ZrG9GdaV-nXYKy NNTP-Posting-Host: 206.53.78.59 References: <9bbd99bd-f953-434d-b3c8-6e8a6d5c7dfd@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <77906f56-8ea0-4d87-8ace-4db1172958cd@googlegroups.com> Subject: Re: Question[s] about aliased extended return. From: sbelmont700@gmail.com Injection-Date: Fri, 09 Nov 2012 20:53:14 +0000 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Date: 2012-11-09T12:53:13-08:00 List-Id: On Friday, November 9, 2012 2:42:37 PM UTC-5, Shark8 wrote: >=20 > Ah that's kinda the point, this is WRT the implementation part [of my Ope= nGL binding] and therefore the interface between the thin/raw-imports and t= he more useful/friendly Ada world. (By Vector I mean something like "Array = (Positive Range <>) of Float" [or whatever], not the Containers's Vector.) >=20 Perhaps something like this: Function GetTexGen (coord : Texture_Coordinate_Type;=20 pname : Texture_Coordinate_Generation)=20 Return Double_Vector_Type is procedure Thin (coord : in Texture_Coordinate_Type;=20 pname : in Texture_Coordinate_Generation)=20 params : aliased in out Double_Vector_Type) is begin glGetTexGendv(coord =3D> coord,=20 pname =3D> pname,=20 params =3D> params'Unchecked_Access); end Thin; =20 begin=20 return Result : Double_Vector_Type(1..Get_Elements( pname )) do=20 C_Kludge(coord =3D> coord,=20 pname =3D> pname,=20 params =3D> Result); End Return;=20 end GetTexGen; In either case, I'm always of the opinion that the 'thin' binding should ma= tch the API and just change types (pointers to arrays, etc), and the 'thick= ' binding should change the structure (procedures to functions, return code= s to exceptions, etc). -ab