lua-users home
lua-l archive

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


On Aug 05, 2003 at 03:25 -0400, Diego Nehab wrote:
> Hi,
> 
> > We currently make one change to the stock Lua5, which is to extend
> > "loadlib()" so that it supports dylib's under OSX.  So far none of the
> > included modules rely on loadlib() so that's not really an obstacle.
> 
> Just out of curiosity, what did you have to change to get loadlib to
> work? I am using the dlcompat here and I think it works fine. Except, of
> course, for the damn "_" in the beginning of exported function names,
> but that can be taken care of in a startup module written in Lua.

I'm not the OSX expert, but I think the reason was so that users
wouldn't have to install dlcompat.

Actually I was remembering wrong; I don't think we change the default
loadlib at all.  However we have a loadlib-derived wrapper for the use
of loadmodule and gluax which are embedded in the luacheia
interpreter.  Here's the wrapper code we use:

http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/luacheia/luacheia/src/luacheia/loadlib.c?rev=HEAD&content-type=text/vnd.viewcvs-markup

-- 
Thatcher Ulrich
http://tulrich.com