lua-users home
lua-l archive

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


>>Where is store this code: errno, lua_State->errorJmp.status
>>or add new member to lua_State (int errcode)? 

> Use the registry. It's there for these kind of uses.

Is it threadsafe?
And where store the pointer to userdata?
Or in each function to set errcode must do someth.:
lua_pushliteral(L, "ec");
lua_pushnumber(L, errcode);
lua_settable(L, LUA_REGISTRYINDEX);