lua-users home
lua-l archive

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




On Tue, Oct 2, 2012 at 2:29 PM, Alexandre Erwin Ittner <alexandre@ittner.com.br> wrote:
On Tue, Oct 2, 2012 at 1:52 PM,  <andre@leiradella.com> wrote:

> 1. Is there a better way to handle a C/Lua mixed module? I don't need anything fancy, just register Lua and C functions.

What about creating a low-level module with the C functions and using
it for the high-level, user-facing, module? I think it's the most
elegant solution for these cases.

The Lua Gems book:

http://www.lua.org/gems/

Has the "27- Writing C/C++ Modules for Lua " chapter that describes this approach on a very interesting way.
 



--
Alexandre Erwin Ittner - alexandre@ittner.com.br
OpenPGP pubkey 0x0041A1FB @ http://pgp.mit.edu