Re: C string pointers to Lua
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: C string pointers to Lua
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: 2010年10月12日 11:34:36 -0300
> > 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.
The OP had this:
const char *arg = lua_tostring (L, 1);
so the strings come from Lua. But you're right: you have to register
the strings in each Lua universe you need them.