[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Embedding Lua twice?
- From: Sean Conner <sean@...>
- Date: Fri, 28 Nov 2014 18:00:17 -0500
It was thus said that the Great Thiago L. once stated:
>
> On 28/11/14 01:46 AM, Sean Conner wrote:
> >It was thus said that the Great Thiago L. once stated:
> >>On 27/11/14 06:24 PM, Luiz Henrique de Figueiredo wrote:
> >>>>Hi! Is there any way to have Lua 5.1 (actually LuaJIT) and Lua 5.2
> >>>>(LuaJIT doesn't support _ENV) on the same program?
> >>>I don't know about LuaJIT but you can have two versions of Lua in the
> >>>same program by building custom versions using one.c and a header file
> >>>that redefines all external symbols to have a different prefix, such
> >>>as lua51 and lua52. You'll need to compile your program modules with
> >>>the header files for each version. See this:
> >>> http://lua-users.org/lists/lua-l/2014-07/msg00164.html
> >>>
> >>Uhh so if I have some Lua .so's I can't dlopen them?
> >
> >Here's the issue: you have foo.so, a Lua module. You have your magic
> >Lua interpreter that manages to include both LuaJIT and Lua 5.2. foo.so
> >wants to call the function lua_load(). LuaJIT, being compatible with Lua
> >5.1, has
[ snip ]
> So basically just use DBus or something?
DBus is a message-passing framework to allow arbitrary processes (that use
DBus) to communicate with each other using a variety of message passing
methods (one-to-one, one-to-many, etc). I'm not sure how using DBus will
help you in having LuaJIT and Lua 5.2 in the same program.
Aside from the "I want to use Lua 5.2 but with the speed of LuaJIT," what
problem are you tryting to solve where "Lua 5.2 and LuaJIT in the same
program" is the answer?
-spc