[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: C arrays as Lua tables
- From: pansz <pan.shizhu@...>
- Date: Tue, 28 Feb 2012 09:20:36 +0800
On Mon, Feb 27, 2012 at 8:28 AM, Dimitris Papavasiliou
>> Out of curiosity, how does this compare to LuaFFI's  array and structure
> I'm not familiar with LuaFFI but from what I understand from the
> description its purpose is to allow a programmer to mix Lua and C
> code. LuaFFI therefore has a much larger scope but it inevitably
> introduces all of C's complexity into Lua to achieve that.
I strongly recommend you try LuaJIT's FFI interface, which IMO
implement C array in a Lua-elegant way.
At least, you can see this document and get some idea:
See this section: Motivating Example: Using C Data Structures