[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: modules containing both C and Lua parts
- From: nr@... (Norman Ramsey)
- Date: Sat, 24 Feb 2007 23:07:54 -0500 (EST)
These days I frequently find myself wanting to create a Lua module
that is part C code and part Lua code. The 'module' and 'require'
functions seem to be set up to support one or the other, but not
both in combination. It looks as if the only way to do this
is to go ahead and write the module in Lua, then do something
relatively horrible with LUA_PATH and package.loadlib. I would
hope there would be a better way, such that perhaps as part
of the 'module' command I could load the C part of my module,
then continue by defining the Lua parts. Does anyone have
any thoughts about how to do this?
Norman