[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: loadlib support for OSX
- From: Thatcher Ulrich <tu@...>
- Date: Tue, 6 Jan 2004 12:17:25 -0500
On Jan 06, 2004 at 01:40 -0200, Luiz Henrique de Figueiredo wrote:
> Thatcher Ulrich wrote:
> >The patch below adds code so that Lua's loadlib can support the native
> >Mac/OSX DylD API for loading binary modules, instead of relying on the
> >dlcompat package, which is an optional add-on.
>
> How does that compare with the one posted by Eli in May?
> http://lua-users.org/lists/lua-l/2003-05/msg00231.html
Whoops, I forgot about that, or I would have just grabbed it... from a
cursory look, it seems it may have better error messages, but
otherwise is very similar. Both routines seem to work the same way.
The one thing I might change in Eli's code would be to use lua_concat
to prepend the underscore to the function name (instead of malloc).
That way there are no conflicts if somebody changes the lua allocation
routines. Or else, use the dynamically sized array trick that's in
the code I posted -- since this is very platform-specific code, that
doesn't seem dangerous.
> We're looking for the simplest implementation but we're also looking for
> quality...
>
> We're definitely interested in having native loadlib support for Mac OS X
> in Lua 5.1. I hope we converge to an implementation soon, but we need testers.
I don't have an OSX machine, but the luacheia project is set up to use
the sourceforge compile-farm to compile luacheia on lots of platforms
(including OSX) and run self-tests, so I can drop Eli's code into
luacheia and see what happens...
--
Thatcher Ulrich
http://tulrich.com