lua-users home
lua-l archive

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


> and in this case you can't even easily use (5.1) lua_cpcall:
> 
>   static int
>   actually_push_string(lua_State *L)
>   {
>       /* Wait a minute, there's no good way to get the string back
>          if the return values go away. */
>       lua_pushstring(L, (char const *)lua_touserdata(L, 1));
>       return 1;
>   }

In 5.2, luaL_cpcall is able to return values. Doesn't that solve
the problem? (luaL_cpcall is also cheaper than 5.1's lua_cpcall.)

-- Roberto