lua-users home
lua-l archive

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


On Mon, Aug 29, 2016 at 5:53 PM, John Dunn <John.Dunn@qsc.com> wrote:
> Is there a way to register a C function that would be called when someone calls require("mymodule")? I have a module that doesn't have any supporting Lua code and I'm just compiling it directly into my application so it's bypassing the usual module mechanism.

Have a look at linit.c - since 5.1 it's very easy to add extra modules
to be registered there.