lua-users home
lua-l archive

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


On Sun, Nov 27, 2005 at 07:19:20PM -0300, Alex Queiroz wrote:
> On 27/11/05, Asko Kauppi <askok@dnainternet.net> wrote:
> >
> > Now, why make it so complicated?  Why not just say, that in the
> > absence of "luaopen_myfilename()" function, a "luaopen_init()" (or
> > similar) will be called.
> >
> 
>      You can't have several "luaopen_init()" functions linked
> together, even dinamically.
right, you can not really have them linked together,
yet you can dlopen several objects having such a function,
as dlopen does not try to "link" the exported symbols.

actually it's common for any object to export such special
symbols like _init and _fini, which are used e.g. to support
C++ global ctors/dtors. on such systems _init could do
most of the work of luaopen_init (but not return something).


cheers