[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: C string pointers to Lua
- From: Mark Hamburg <mark@...>
- Date: Tue, 12 Oct 2010 07:27:36 -0700
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.