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=unavailable autolearn_force=no version=3.4.4 X-Received: by 10.224.171.72 with SMTP id g8mr14765787qaz.7.1376555872768; Thu, 15 Aug 2013 01:37:52 -0700 (PDT) X-Received: by 10.49.134.37 with SMTP id ph5mr236129qeb.4.1376555872732; Thu, 15 Aug 2013 01:37:52 -0700 (PDT) Path: border1.nntp.ams.giganews.com!nntp.giganews.com!feeder2.cambriumusenet.nl!feeder3.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!f7no2429972qan.0!news-out.google.com!he10ni1979qab.0!nntp.google.com!fx3no2549927qab.0!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 15 Aug 2013 01:37:52 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=193.71.180.107; posting-account=P68zsgoAAABKpXKMUuwuUZ_RfBk1kZfB NNTP-Posting-Host: 193.71.180.107 References: <86395c3d-e0e2-41f1-8286-08a64125fd2e@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <14a38e9e-0449-4df7-8998-930f3c29634b@googlegroups.com> Subject: Re: (GNADE) Access attribute not allowed in generic body From: egilhh Injection-Date: Thu, 15 Aug 2013 08:37:52 +0000 Content-Type: text/plain; charset=ISO-8859-1 X-Received-Bytes: 2613 Xref: number.nntp.dca.giganews.com comp.lang.ada:183030 Date: 2013-08-15T01:37:52-07:00 List-Id: On Thursday, August 15, 2013 9:53:37 AM UTC+2, Dmitry A. Kazakov wrote: > > 2.0. I moved Get and Set to private part of the package and used > > 'Unrestricted_Access in Register. E.g.: 'Unrestricted_Access is Gnat-specific. A more portable alternative would be constants in the private part of the spec: > with GNU.DB.SQLCLI.Generic_Attr.String_Attribute; [...] > private > > function Get (Handle : Ctx; > > Attribute : Attr.T; > > MaxLength : SQLSMALLINT := 0; > > Data : Attr.Aux; > > ErrorCode : access SQLRETURN) > > return Attr.Attribute_Value_Pair'Class; > > procedure Set (Handle : in Ctx; > > AV_Pair : in Attr.Attribute_Value_Pair'Class; > > Data : in Attr.Aux; > > ErrorCode : out SQLRETURN); Get_Access : constant Attr_Get_Func := Get'Access; Set_Access : constant Attr_Set_Proc := Set'Access; > end GNU.DB.SQLCLI.Dispatch.A_String; > > -------------------------------- > > package body GNU.DB.SQLCLI.Dispatch.A_String is [...] > procedure Register (Index : in Attr.T) is > > begin Get_Dispatch_Array (Index) := Get_Access; Set_Dispatch_Array (Index) := Set_Access; > end Register; > > > > end GNU.DB.SQLCLI.Dispatch.A_String; > > -----------------------------------