lua-users home
lua-l archive

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


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