diff options
Diffstat (limited to 'lobject.h')
-rw-r--r-- | lobject.h | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -1,5 +1,5 @@ | |||
1 | /* | 1 | /* |
2 | ** $Id: lobject.h,v 2.37 2010/04/12 16:07:06 roberto Exp roberto $ | 2 | ** $Id: lobject.h,v 2.38 2010/04/14 15:13:48 roberto Exp roberto $ |
3 | ** Type definitions for Lua objects | 3 | ** Type definitions for Lua objects |
4 | ** See Copyright Notice in lua.h | 4 | ** See Copyright Notice in lua.h |
5 | */ | 5 | */ |
@@ -25,10 +25,10 @@ | |||
25 | 25 | ||
26 | 26 | ||
27 | /* | 27 | /* |
28 | ** Variant tag for C-function pointers (negative to be considered | 28 | ** Variant tag for light C functions (negative to be considered |
29 | ** non collectable by 'iscollectable') | 29 | ** non collectable by 'iscollectable') |
30 | */ | 30 | */ |
31 | #define LUA_TCFP (~0x0F | LUA_TFUNCTION) | 31 | #define LUA_TLCF (~0x0F | LUA_TFUNCTION) |
32 | 32 | ||
33 | /* | 33 | /* |
34 | ** Union of all collectable objects | 34 | ** Union of all collectable objects |
@@ -99,7 +99,7 @@ typedef struct lua_TValue { | |||
99 | #define ttistable(o) (ttype(o) == LUA_TTABLE) | 99 | #define ttistable(o) (ttype(o) == LUA_TTABLE) |
100 | #define ttisfunction(o) (ttypenv(o) == LUA_TFUNCTION) | 100 | #define ttisfunction(o) (ttypenv(o) == LUA_TFUNCTION) |
101 | #define ttisclosure(o) (ttype(o) == LUA_TFUNCTION) | 101 | #define ttisclosure(o) (ttype(o) == LUA_TFUNCTION) |
102 | #define ttiscfp(o) (ttype(o) == LUA_TCFP) | 102 | #define ttislcf(o) (ttype(o) == LUA_TLCF) |
103 | #define ttisboolean(o) (ttype(o) == LUA_TBOOLEAN) | 103 | #define ttisboolean(o) (ttype(o) == LUA_TBOOLEAN) |
104 | #define ttisuserdata(o) (ttype(o) == LUA_TUSERDATA) | 104 | #define ttisuserdata(o) (ttype(o) == LUA_TUSERDATA) |
105 | #define ttisthread(o) (ttype(o) == LUA_TTHREAD) | 105 | #define ttisthread(o) (ttype(o) == LUA_TTHREAD) |
@@ -115,7 +115,7 @@ typedef struct lua_TValue { | |||
115 | #define rawuvalue(o) check_exp(ttisuserdata(o), &(o)->value_.gc->u) | 115 | #define rawuvalue(o) check_exp(ttisuserdata(o), &(o)->value_.gc->u) |
116 | #define uvalue(o) (&rawuvalue(o)->uv) | 116 | #define uvalue(o) (&rawuvalue(o)->uv) |
117 | #define clvalue(o) check_exp(ttisclosure(o), &(o)->value_.gc->cl) | 117 | #define clvalue(o) check_exp(ttisclosure(o), &(o)->value_.gc->cl) |
118 | #define fvalue(o) check_exp(ttiscfp(o), (o)->value_.f) | 118 | #define fvalue(o) check_exp(ttislcf(o), (o)->value_.f) |
119 | #define hvalue(o) check_exp(ttistable(o), &(o)->value_.gc->h) | 119 | #define hvalue(o) check_exp(ttistable(o), &(o)->value_.gc->h) |
120 | #define bvalue(o) check_exp(ttisboolean(o), (o)->value_.b) | 120 | #define bvalue(o) check_exp(ttisboolean(o), (o)->value_.b) |
121 | #define thvalue(o) check_exp(ttisthread(o), &(o)->value_.gc->th) | 121 | #define thvalue(o) check_exp(ttisthread(o), &(o)->value_.gc->th) |
@@ -140,7 +140,7 @@ typedef struct lua_TValue { | |||
140 | { TValue *i_o=(obj); i_o->value_.n=(x); i_o->tt_=LUA_TNUMBER; } | 140 | { TValue *i_o=(obj); i_o->value_.n=(x); i_o->tt_=LUA_TNUMBER; } |
141 | 141 | ||
142 | #define setfvalue(obj,x) \ | 142 | #define setfvalue(obj,x) \ |
143 | { TValue *i_o=(obj); i_o->value_.f=(x); i_o->tt_=LUA_TCFP; } | 143 | { TValue *i_o=(obj); i_o->value_.f=(x); i_o->tt_=LUA_TLCF; } |
144 | 144 | ||
145 | #define changenvalue(obj,x) \ | 145 | #define changenvalue(obj,x) \ |
146 | ( lua_assert((obj)->tt_==LUA_TNUMBER), (obj)->value_.n=(x) ) | 146 | ( lua_assert((obj)->tt_==LUA_TNUMBER), (obj)->value_.n=(x) ) |