aboutsummaryrefslogtreecommitdiff
path: root/lvm.h
diff options
context:
space:
mode:
Diffstat (limited to 'lvm.h')
-rw-r--r--lvm.h18
1 files changed, 11 insertions, 7 deletions
diff --git a/lvm.h b/lvm.h
index 54ee5dd7..3b11e789 100644
--- a/lvm.h
+++ b/lvm.h
@@ -78,17 +78,19 @@ typedef enum {
78/* 78/*
79** fast track for 'gettable' 79** fast track for 'gettable'
80*/ 80*/
81#define luaV_fastget(t,k,res,f, hres) \ 81#define luaV_fastget(t,k,res,f, aux) \
82 (hres = (!ttistable(t) ? HNOTATABLE : f(hvalue(t), k, res))) 82 {if (!ttistable(t)) setnotableV(aux); \
83 else { aux = f(hvalue(t), k); \
84 if (!isemptyV(aux)) { setobjV(cast(lua_State*, NULL), res, aux); } } }
83 85
84 86
85/* 87/*
86** Special case of 'luaV_fastget' for integers, inlining the fast case 88** Special case of 'luaV_fastget' for integers, inlining the fast case
87** of 'luaH_getint'. 89** of 'luaH_getint'.
88*/ 90*/
89#define luaV_fastgeti(t,k,res,hres) \ 91#define luaV_fastgeti(t,k,res,aux) \
90 if (!ttistable(t)) hres = HNOTATABLE; \ 92 { if (!ttistable(t)) setnotableV(aux); \
91 else { luaH_fastgeti(hvalue(t), k, res, hres); } 93 else { luaH_fastgeti(hvalue(t), k, res, aux); } }
92 94
93 95
94#define luaV_fastset(t,k,val,hres,f) \ 96#define luaV_fastset(t,k,val,hres,f) \
@@ -120,8 +122,10 @@ LUAI_FUNC int luaV_tointeger (const TValue *obj, lua_Integer *p, F2Imod mode);
120LUAI_FUNC int luaV_tointegerns (const TValue *obj, lua_Integer *p, 122LUAI_FUNC int luaV_tointegerns (const TValue *obj, lua_Integer *p,
121 F2Imod mode); 123 F2Imod mode);
122LUAI_FUNC int luaV_flttointeger (lua_Number n, lua_Integer *p, F2Imod mode); 124LUAI_FUNC int luaV_flttointeger (lua_Number n, lua_Integer *p, F2Imod mode);
123LUAI_FUNC void luaV_finishget (lua_State *L, const TValue *t, TValue *key, 125#define luaV_finishget(L,t,key,val,aux) \
124 StkId val, int aux); 126 luaV_finishget_(L,t,key,val,ttypetagV(aux))
127LUAI_FUNC void luaV_finishget_ (lua_State *L, const TValue *t, TValue *key,
128 StkId val, int tag);
125LUAI_FUNC void luaV_finishset (lua_State *L, const TValue *t, TValue *key, 129LUAI_FUNC void luaV_finishset (lua_State *L, const TValue *t, TValue *key,
126 TValue *val, int aux); 130 TValue *val, int aux);
127LUAI_FUNC void luaV_finishOp (lua_State *L); 131LUAI_FUNC void luaV_finishOp (lua_State *L);