[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Wishlists and Modules (was [ANN] libmc)
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Fri, 4 Sep 2009 10:24:37 -0300
> 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.