Small correction in assertion
This commit is contained in:
2
lapi.c
2
lapi.c
@@ -230,7 +230,7 @@ LUA_API void lua_copy (lua_State *L, int fromidx, int toidx) {
|
|||||||
lua_lock(L);
|
lua_lock(L);
|
||||||
fr = index2value(L, fromidx);
|
fr = index2value(L, fromidx);
|
||||||
to = index2value(L, toidx);
|
to = index2value(L, toidx);
|
||||||
api_check(l, isvalid(L, to), "invalid index");
|
api_check(L, isvalid(L, to), "invalid index");
|
||||||
setobj(L, to, fr);
|
setobj(L, to, fr);
|
||||||
if (isupvalue(toidx)) /* function upvalue? */
|
if (isupvalue(toidx)) /* function upvalue? */
|
||||||
luaC_barrier(L, clCvalue(s2v(L->ci->func)), fr);
|
luaC_barrier(L, clCvalue(s2v(L->ci->func)), fr);
|
||||||
|
|||||||
@@ -99,7 +99,7 @@ typedef LUAI_UACINT l_uacInt;
|
|||||||
** assertion for checking API calls
|
** assertion for checking API calls
|
||||||
*/
|
*/
|
||||||
#if !defined(luai_apicheck)
|
#if !defined(luai_apicheck)
|
||||||
#define luai_apicheck(l,e) lua_assert(e)
|
#define luai_apicheck(l,e) ((void)l, lua_assert(e))
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define api_check(l,e,msg) luai_apicheck(l,(e) && msg)
|
#define api_check(l,e,msg) luai_apicheck(l,(e) && msg)
|
||||||
|
|||||||
Reference in New Issue
Block a user