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,9939161a73e5f223 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.66.86.73 with SMTP id n9mr7605814paz.17.1357157290608; Wed, 02 Jan 2013 12:08:10 -0800 (PST) Path: s9ni78363pbb.0!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: Please help with my lua binding Date: Wed, 02 Jan 2013 20:08:10 +0000 Organization: A noiseless patient Spider Message-ID: References: <38857635-8ab5-4ff6-b547-f40ac31720a2@googlegroups.com> <87bod79xlf.fsf@mid.deneb.enyo.de> Mime-Version: 1.0 Injection-Info: mx04.eternal-september.org; posting-host="585248293da7adcafb924c79c19cf5ec"; logging-data="9567"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18CZd7ExTkMMkD2gxpeSaDyQr4ePfxtRA8=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (darwin) Cancel-Lock: sha1:dHLvcbKLlNWXF7uVU+IZeEGYO0o= sha1:ojBNOXV8KOVMuUscLh6ueIh/1Hs= Content-Type: text/plain Date: 2013-01-02T20:08:10+00:00 List-Id: Patrick writes: > In my lua_h.ads file I put this: > type lua_State is private; > type lua_State is new System.Address; > > and in the test.adb file I did this: > procedure test is > result : Integer ; > L : lua_State ; > > begin > > L := luaL_newstate ; > > end test ; > > > I got this: > test.adb:13:06: expected private type "lua_State" defined at lua_h.ads:161 > test.adb:13:06: found private type "System.Address" These are because GNAT has been confused by ... > lua_h.ads:161:01: declaration of full view must appear in private part So you need to say with System; package lua_h is ... type lua_state is private; ... private -- this begins the private part ... type lua_state is new System.Address; ... end lua_h;