MAY_LJMP(check_args(L, 2, "set_priv"));
/* Remove previous value. */
- if (hlua->Mref != -1)
- luaL_unref(L, LUA_REGISTRYINDEX, hlua->Mref);
+ luaL_unref(L, LUA_REGISTRYINDEX, hlua->Mref);
/* Get and store new value. */
lua_pushvalue(L, 2); /* Copy the element 2 at the top of the stack. */
MAY_LJMP(check_args(L, 2, "set_priv"));
/* Remove previous value. */
- if (hlua->Mref != -1)
- luaL_unref(L, LUA_REGISTRYINDEX, hlua->Mref);
+ luaL_unref(L, LUA_REGISTRYINDEX, hlua->Mref);
/* Get and store new value. */
lua_pushvalue(L, 2); /* Copy the element 2 at the top of the stack. */
hlua = hlua_gethlua(L);
/* Remove previous value. */
- if (hlua->Mref != -1)
- luaL_unref(L, LUA_REGISTRYINDEX, hlua->Mref);
+ luaL_unref(L, LUA_REGISTRYINDEX, hlua->Mref);
/* Get and store new value. */
lua_pushvalue(L, 2); /* Copy the element 2 at the top of the stack. */