lua-users home
lua-l archive

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

On Oct 12, 2010, at 4:46 AM, Luiz Henrique de Figueiredo wrote:

>>> #define lua_loadstrconst(L,s) s=lua_pushstring(L,s)
>> Cool, that's even better. I didn't notice that since it is Lua 5.2 feature.
> Oh, sorry for using a 5.2 feature. You can do it in 5.1:
> 	lua_pushstring(L,s); s=lua_tostring(L,-1)

Note that this does not work if you have multiple Lua universes since the string will have different identities in different universes.