[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Q re using a standard C lib with lua
- From: Vaughan McAlley <vaughan@...>
- Date: Tue, 1 Jun 2010 12:16:08 +1000
On 1 June 2010 06:53, Heinz Wittenbecher <firstname.lastname@example.org> wrote:
> Thank you for the suggestions Luiz. Gives me a place to start.
> I forgot to mention that while I don't know much C myself I do have access to C expertise.
> It's the "cry wolf too often" syndrome I'm trying to avoid so I try to "qualify" my pondering and dreaming first. :-)
> On 2010-05-31, at 1:43 PM, Luiz Henrique de Figueiredo wrote:
>>> I am looking for some input from lua experts as to feasibility of creating a lua module of our DISAM file-handler.
>> From what I could gather from the URL you posted, it should be simple
>> to create a Lua binding in C, but of course you'll need to know C. If
>> you want examples of bindings, look at the sources of the standard Lua
>> libraries (e.g., lmathlib.c and liolib.c) and also my libraries (e.g.,
>> lgdbm): http://www.tecgraf.puc-rio.br/~lhf/ftp/lua/
If you're like me and like to maximize Lua and minimize C, all you
really need is an understanding of how the stack works to transfer
incompatible data types between Lua and C. Programming in Lua (
http://www.lua.org/pil/24.2.html ) is a good start.