summaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-03-16 11:21:20 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2018-03-16 11:21:20 -0300
commit7b0b6b3b3945b1adcf460321227243143d7e1543 (patch)
tree124072211a45f638975085050c1e5259efd906f4 /lvm.c
parent89da4168df5c8f6199504fed6e25fc5326c14fd2 (diff)
downloadlua-7b0b6b3b3945b1adcf460321227243143d7e1543.tar.gz
lua-7b0b6b3b3945b1adcf460321227243143d7e1543.tar.bz2
lua-7b0b6b3b3945b1adcf460321227243143d7e1543.zip
cannot use 'defined' inside a macro +
call to 'luaT_keydef' must be protected
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/lvm.c b/lvm.c
index b3abbf13..fd74bff5 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.349 2018/03/02 18:59:19 roberto Exp roberto $ 2** $Id: lvm.c,v 2.350 2018/03/07 15:55:38 roberto Exp roberto $
3** Lua virtual machine 3** Lua virtual machine
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -36,7 +36,11 @@
36** and compatible compilers. 36** and compatible compilers.
37*/ 37*/
38#if !defined(LUA_USE_JUMPTABLE) 38#if !defined(LUA_USE_JUMPTABLE)
39#define LUA_USE_JUMPTABLE defined(__GNUC__) 39#if defined(__GNUC__)
40#define LUA_USE_JUMPTABLE 1
41#else
42#define LUA_USE_JUMPTABLE 0
43#endif
40#endif 44#endif
41 45
42 46
@@ -1560,7 +1564,8 @@ void luaV_execute (lua_State *L, CallInfo *ci) {
1560 vmcase(OP_ISDEF) { 1564 vmcase(OP_ISDEF) {
1561 TValue *rb = vRB(i); 1565 TValue *rb = vRB(i);
1562 TValue *rc = vRC(i); 1566 TValue *rc = vRC(i);
1563 int res = luaT_keydef(L, rb, rc, 0); 1567 int res;
1568 Protect(res = luaT_keydef(L, rb, rc, 0));
1564 setbvalue(vra, res == GETARG_k(i)); 1569 setbvalue(vra, res == GETARG_k(i));
1565 vmbreak; 1570 vmbreak;
1566 } 1571 }