[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Wishlists and Modules (was [ANN] libmc)
- From: Joshua Jensen <jjensen@...>
- Date: Fri, 04 Sep 2009 07:21:38 -0600
----- Original Message -----
From: Jerome Vuarand
Date: 9/4/2009 6:42 AM
This reminds me of a gripe that has been brought up before, but it bit
me again the other day. Someone, please tell me I am doing it wrong.
This all comes down to the fact that C don't allow embedding large
text files in programs easily, or that some people write Lua modules.
It's very nice that some people (like the Lua authors) take time to
write C modules when they could take less time to do the same in pure
Lua or a C/Lua hybrid, but as the language becomes popular and the
"level" of modules gets higher, doing it all in C is just too much
I have a module that has a mymodule.lua file and a mymodule.dll. I want
to require 'mymodule' and have it load both mymodule.lua and
mymodule.dll. Instead, I have to have mymodule.lua require
'mymodule.core' (or something similar) and change the exported symbol to
luaopen_mymodule_core, so that mymodule.dll can be loaded. This was a
pain, because initially, there was only a mymodule.dll with the export
luaopen_mymodule, and when I added mymodule.lua, I had to find the code
for and recompile mymodule.dll with a changed export.
Is there a better way?