Re: Embedding Lua twice?
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: Embedding Lua twice?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2014年11月27日 18:24:31 -0200
> 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