[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: A major problem with the Lua ecosystem
- From: Sean Conner <sean@...>
- Date: Fri, 2 Feb 2018 17:18:35 -0500
It was thus said that the Great Dibyendu Majumdar once stated:
> On 2 February 2018 at 22:00, Sean Conner <sean@conman.org> wrote:
>
> > Lua modules written in Lua can be renamed easily---just change the name of
> > the file [1]. Modules written in C can't be renamed without a code change
> > due to possible linking restrictions [2]---Lua looks for
> > "luaopen_modulename" when loading a C-based module.
>
> I was thinking that require should allow an optional module name -
> i.e. lookup as now, but use the module name (if given) when saving the
> reference. That way, the name of the module inside Lua becomes
> independent of how the module was resolved.
Example? My own syslog module is in C, and the exported symbol is
luaopen_org_conman_syslog
-spc