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: a07f3367d7,9939161a73e5f223 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit X-Received: by 10.66.89.39 with SMTP id bl7mr6691808pab.33.1357156013786; Wed, 02 Jan 2013 11:46:53 -0800 (PST) Path: 6ni78096pbd.1!nntp.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.glorb.com!feeder.erje.net!eu.feeder.erje.net!newsfeed.freenet.ag!news.babsi.de!open-news-network.org!news.gnuher.de!news.enyo.de!.POSTED!not-for-mail From: Florian Weimer Newsgroups: comp.lang.ada Subject: Re: Please help with my lua binding Supersedes: <87pq1n9ybk.fsf@mid.deneb.enyo.de> Date: Wed, 02 Jan 2013 20:46:52 +0100 Message-ID: <87bod79xlf.fsf@mid.deneb.enyo.de> References: <38857635-8ab5-4ff6-b547-f40ac31720a2@googlegroups.com> Mime-Version: 1.0 X-Trace: news.enyo.de 1357156012 9445 172.17.135.6 (2 Jan 2013 19:46:52 GMT) X-Complaints-To: news@enyo.de Cancel-Key: sha1:bFbHxKJ6PPVLmKyqP6JIo+awob8= Cancel-Lock: sha1:uGST8yMIxXASpgPjA0fLJMVjXJo= Content-Type: text/plain; charset=us-ascii Date: 2013-01-02T20:46:52+01:00 List-Id: * > I tried to define it as: > > type lua_State is access lua_State; > pragma Import (C, lua_State, "lua_State"); type lua_State is private; And then: type lua_State is new System.Address; This actually serves as "lua_State *" on the Ada side. It's not 100% correct, but I'm pretty sure it works on all GCC-based platforms support by GNAT.