lua-users home
lua-l archive

Re: Wishlists and Modules (was [ANN] libmc)

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


> 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.
> 
> Is there a better way?
Write your own loader and add it to package.loaders before everything.
In this loader, you call the C loader and then the Lua loader.

AltStyle によって変換されたページ (->オリジナル) /