eris: fix lua_modflagbits
This commit is contained in:
@@ -909,15 +909,15 @@ LUA_API void lua_setflagbits (lua_State *L, int idx, unsigned short bits) {
|
|||||||
lua_unlock(L);
|
lua_unlock(L);
|
||||||
}
|
}
|
||||||
|
|
||||||
LUA_API void lua_modflagbits (lua_State *L, int idx, unsigned short set, unsigned short clear) {
|
LUA_API void lua_modflagbits (lua_State *L, int idx, unsigned short clear, unsigned short set) {
|
||||||
TValue *obj;
|
TValue *obj;
|
||||||
Table *tab;
|
Table *tab;
|
||||||
lua_lock(L);
|
lua_lock(L);
|
||||||
obj = index2addr(L, idx);
|
obj = index2addr(L, idx);
|
||||||
api_check(L, ttistable(obj), "table expected");
|
api_check(L, ttistable(obj), "table expected");
|
||||||
tab = hvalue(obj);
|
tab = hvalue(obj);
|
||||||
tab->flagbits |= set;
|
|
||||||
tab->flagbits &= (~clear);
|
tab->flagbits &= (~clear);
|
||||||
|
tab->flagbits |= set;
|
||||||
lua_unlock(L);
|
lua_unlock(L);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -246,7 +246,7 @@ LUA_API void (lua_rawsetp) (lua_State *L, int idx, const void *p);
|
|||||||
LUA_API int (lua_setmetatable) (lua_State *L, int objindex);
|
LUA_API int (lua_setmetatable) (lua_State *L, int objindex);
|
||||||
LUA_API void (lua_setuservalue) (lua_State *L, int idx);
|
LUA_API void (lua_setuservalue) (lua_State *L, int idx);
|
||||||
LUA_API void (lua_setflagbits) (lua_State *L, int idx, unsigned short bits);
|
LUA_API void (lua_setflagbits) (lua_State *L, int idx, unsigned short bits);
|
||||||
LUA_API void (lua_modflagbits) (lua_State *L, int idx, unsigned short set, unsigned short clear);
|
LUA_API void (lua_modflagbits) (lua_State *L, int idx, unsigned short clear, unsigned short set);
|
||||||
LUA_API unsigned short (lua_getflagbits) (lua_State *L, int idx);
|
LUA_API unsigned short (lua_getflagbits) (lua_State *L, int idx);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
Reference in New Issue
Block a user