[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Register static lib C module
- From: steve donovan <steve.j.donovan@...>
- Date: Mon, 29 Aug 2016 18:22:28 +0200
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.