aboutsummaryrefslogtreecommitdiff
path: root/lvm.c
diff options
context:
space:
mode:
Diffstat (limited to 'lvm.c')
-rw-r--r--lvm.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/lvm.c b/lvm.c
index 9cbb9f45..7c15e899 100644
--- a/lvm.c
+++ b/lvm.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lvm.c,v 2.284 2017/05/18 19:44:19 roberto Exp roberto $ 2** $Id: lvm.c,v 2.285 2017/05/23 12:50:11 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*/
@@ -916,8 +916,9 @@ void luaV_execute (lua_State *L) {
916 TValue *rb = KB(i); 916 TValue *rb = KB(i);
917 TValue *rc = RKC(i); 917 TValue *rc = RKC(i);
918 TString *key = tsvalue(rb); /* key must be a string */ 918 TString *key = tsvalue(rb); /* key must be a string */
919 if (luaV_fastget(L, upval, key, slot, luaH_getshortstr)) 919 if (luaV_fastget(L, upval, key, slot, luaH_getshortstr)) {
920 luaV_finishfastset(L, upval, slot, rc); 920 luaV_finishfastset(L, upval, slot, rc);
921 }
921 else 922 else
922 Protect(luaV_finishset(L, upval, rb, rc, slot)); 923 Protect(luaV_finishset(L, upval, rb, rc, slot));
923 vmbreak; 924 vmbreak;
@@ -929,8 +930,9 @@ void luaV_execute (lua_State *L) {
929 lua_Unsigned n; 930 lua_Unsigned n;
930 if (ttisinteger(rb) /* fast track for integers? */ 931 if (ttisinteger(rb) /* fast track for integers? */
931 ? (n = ivalue(rb), luaV_fastgeti(L, ra, n, slot)) 932 ? (n = ivalue(rb), luaV_fastgeti(L, ra, n, slot))
932 : luaV_fastget(L, ra, rb, slot, luaH_get)) 933 : luaV_fastget(L, ra, rb, slot, luaH_get)) {
933 luaV_finishfastset(L, ra, slot, rc); 934 luaV_finishfastset(L, ra, slot, rc);
935 }
934 else 936 else
935 Protect(luaV_finishset(L, ra, rb, rc, slot)); 937 Protect(luaV_finishset(L, ra, rb, rc, slot));
936 vmbreak; 938 vmbreak;
@@ -939,8 +941,9 @@ void luaV_execute (lua_State *L) {
939 const TValue *slot; 941 const TValue *slot;
940 int c = GETARG_B(i); 942 int c = GETARG_B(i);
941 TValue *rc = RKC(i); 943 TValue *rc = RKC(i);
942 if (luaV_fastgeti(L, ra, c, slot)) 944 if (luaV_fastgeti(L, ra, c, slot)) {
943 luaV_finishfastset(L, ra, slot, rc); 945 luaV_finishfastset(L, ra, slot, rc);
946 }
944 else { 947 else {
945 TValue key; 948 TValue key;
946 setivalue(&key, c); 949 setivalue(&key, c);
@@ -953,8 +956,9 @@ void luaV_execute (lua_State *L) {
953 TValue *rb = KB(i); 956 TValue *rb = KB(i);
954 TValue *rc = RKC(i); 957 TValue *rc = RKC(i);
955 TString *key = tsvalue(rb); /* key must be a string */ 958 TString *key = tsvalue(rb); /* key must be a string */
956 if (luaV_fastget(L, ra, key, slot, luaH_getshortstr)) 959 if (luaV_fastget(L, ra, key, slot, luaH_getshortstr)) {
957 luaV_finishfastset(L, ra, slot, rc); 960 luaV_finishfastset(L, ra, slot, rc);
961 }
958 else 962 else
959 Protect(luaV_finishset(L, ra, rb, rc, slot)); 963 Protect(luaV_finishset(L, ra, rb, rc, slot));
960 vmbreak; 964 vmbreak;