lua-users home
lua-l archive

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


The following (simplified) sequence works under 5.0.2…

 

lua_State* thread = lua_newthread(L);

refKey = luaL_ref(L, LUA_REGISTRYINDEX);

lua_pcall(thread, 0, 0, 0);

lua_getglobal(thread, "main");

lua_pushnumber(thread, id);

lua_resume(thread, 1);

 

…but under 5.1 the call to lua_resume() fails, and lua_tostring(thread, -1) returns an inconsistent numerical value (in the range of 0 through 60).

 

Is there something about this sequence that is no longer valid under 5.1?

 

Thanks,

Brian