lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Mon, Feb 27, 2012 at 8:28 AM, Dimitris Papavasiliou
<dpapavas@gmail.com> wrote:
>> Out of curiosity, how does this compare to LuaFFI's [1] array and structure
>> manipulation?
>
> 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
http://luajit.org/ext_ffi.html