lua-users home
lua-l archive

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


On Sun, Jul 06, 2014 at 05:03:39PM -0500, Andrew Starks wrote:
> On Sunday, July 6, 2014, Jay Carlson <nop@nop.com> wrote:
> 
> > On Jul 6, 2014 10:02 AM, "Enrico Tassi" <gares@fettunta.org
> > <javascript:_e(%7B%7D,'cvml','gares@fettunta.org');>> wrote:
> >
> > > Would it be possible to name the symbols after the Lua version?  I'm
> > > wondering if something like having #define lua_foo lua53_foo for each
> > > symbol that is part of the public API would work.
> >
> > Yes, I think it would be possible. Who would make this decision, and what
> > action would result?
> >
> > Do other packagers besides Debian have an opinion?
> >
> If I may: Lua on Windows names the dll "lua51.dll" or "lua52.dll"

Shared objects are names liblua5.1.so.0.0.0 and liblua5.2.so.0.0.0, but
this is not enough.  You can have a library libfoo.so that is developed
by John and that links the former, and another library, libbar.so,
developed by Jack that links the latter.  Now, if I want to use both
libfoo and libbar the loader has to load one fist, say foo, and in turn
this loads liblua5.1 with all its symbols.  When it is the turn of bar,
even if liblua5.2 is loaded, some symbols, say lua_pushinteger, are
already there and take precedence.  So you end up having bar using some
lua5.1 symbols expecting them to be lua5.2 symbols...

very nasty.
-- 
Enrico Tassi