diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-12-13 14:02:42 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2019-12-13 14:02:42 -0300 |
commit | 37474873203f247552021ab5856ab69d777166a2 (patch) | |
tree | 0c8a2d677fcc7b515439161f188269d118a7433c | |
parent | 1e0ad018cef2a8e771787f126ce2150028749411 (diff) | |
download | lua-37474873203f247552021ab5856ab69d777166a2.tar.gz lua-37474873203f247552021ab5856ab69d777166a2.tar.bz2 lua-37474873203f247552021ab5856ab69d777166a2.zip |
Small correction in assertion
-rw-r--r-- | lapi.c | 2 | ||||
-rw-r--r-- | llimits.h | 2 |
2 files changed, 2 insertions, 2 deletions
@@ -230,7 +230,7 @@ LUA_API void lua_copy (lua_State *L, int fromidx, int toidx) { | |||
230 | lua_lock(L); | 230 | lua_lock(L); |
231 | fr = index2value(L, fromidx); | 231 | fr = index2value(L, fromidx); |
232 | to = index2value(L, toidx); | 232 | to = index2value(L, toidx); |
233 | api_check(l, isvalid(L, to), "invalid index"); | 233 | api_check(L, isvalid(L, to), "invalid index"); |
234 | setobj(L, to, fr); | 234 | setobj(L, to, fr); |
235 | if (isupvalue(toidx)) /* function upvalue? */ | 235 | if (isupvalue(toidx)) /* function upvalue? */ |
236 | luaC_barrier(L, clCvalue(s2v(L->ci->func)), fr); | 236 | luaC_barrier(L, clCvalue(s2v(L->ci->func)), fr); |
@@ -99,7 +99,7 @@ typedef LUAI_UACINT l_uacInt; | |||
99 | ** assertion for checking API calls | 99 | ** assertion for checking API calls |
100 | */ | 100 | */ |
101 | #if !defined(luai_apicheck) | 101 | #if !defined(luai_apicheck) |
102 | #define luai_apicheck(l,e) lua_assert(e) | 102 | #define luai_apicheck(l,e) ((void)l, lua_assert(e)) |
103 | #endif | 103 | #endif |
104 | 104 | ||
105 | #define api_check(l,e,msg) luai_apicheck(l,(e) && msg) | 105 | #define api_check(l,e,msg) luai_apicheck(l,(e) && msg) |