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 <[email protected]> wrote:
On Tue, Oct 2, 2012 at 1:52 PM,  <[email protected]> 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 - [email protected]
OpenPGP pubkey 0x0041A1FB @ http://pgp.mit.edu