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