lua-users home
lua-l archive

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

what happened to lua_pushupvalues() ?
That was compatibility code. Do you really need it?

Well, I was using it yes, but assuming LUA_TNONE != LUA_TNIL (such that I do get nil upvalues pushed), then I can just substitute the code I guess, and it should be the same thing.

What is the supported way of doing this now?

 for (i = 1; lua_type(L, lua_upvalueindex(i)) != LUA_TNONE; i++) {
   luaL_checkstack(L, 1, "");
   lua_pushvalue(L, lua_upvalueindex(i));


Love, Light and Peace,
- Peter Loveday
Director of Development, eyeon Software