|
#define | ABSTKEYCONSTANT {NULL}, LUA_VABSTKEY |
|
#define | BIT_ISCOLLECTABLE (1 << 6) |
|
#define | BITRAS (1 << 7) |
|
#define | checkliveness(L, obj) |
|
#define | checktag(o, t) (rawtt(o) == (t)) |
|
#define | checktype(o, t) (ttype(o) == (t)) |
|
#define | chgfltvalue(obj, x) { TValue *io=(obj); lua_assert(ttisfloat(io)); val_(io).n=(x); } |
|
#define | chgivalue(obj, x) { TValue *io=(obj); lua_assert(ttisinteger(io)); val_(io).i=(x); } |
|
#define | clCvalue(o) check_exp(ttisCclosure(o), gco2ccl(val_(o).gc)) |
|
#define | clLvalue(o) check_exp(ttisLclosure(o), gco2lcl(val_(o).gc)) |
|
#define | ClosureHeader CommonHeader; lu_byte nupvalues; GCObject *gclist |
|
#define | clvalue(o) check_exp(ttisclosure(o), gco2cl(val_(o).gc)) |
|
#define | CommonHeader struct GCObject *next; lu_byte tt; lu_byte marked |
|
#define | ctb(t) ((t) | BIT_ISCOLLECTABLE) |
|
#define | fltvalue(o) check_exp(ttisfloat(o), val_(o).n) |
|
#define | fltvalueraw(v) ((v).n) |
|
#define | fvalue(o) check_exp(ttislcf(o), val_(o).f) |
|
#define | fvalueraw(v) ((v).f) |
|
#define | gckey(n) (keyval(n).gc) |
|
#define | gckeyN(n) (keyiscollectable(n) ? gckey(n) : NULL) |
|
#define | gcvalue(o) check_exp(iscollectable(o), val_(o).gc) |
|
#define | gcvalueraw(v) ((v).gc) |
|
#define | getnodekey(L, obj, node) |
|
#define | getproto(o) (clLvalue(o)->p) |
|
#define | getstr(ts) ((ts)->contents) |
|
#define | getudatamem(u) (cast_charp(u) + udatamemoffset((u)->nuvalue)) |
|
#define | hvalue(o) check_exp(ttistable(o), gco2t(val_(o).gc)) |
|
#define | isabstkey(v) checktag((v), LUA_VABSTKEY) |
|
#define | iscollectable(o) (rawtt(o) & BIT_ISCOLLECTABLE) |
|
#define | isempty(v) ttisnil(v) |
|
#define | isLfunction(o) ttisLclosure(o) |
|
#define | isnonstrictnil(v) (ttisnil(v) && !ttisstrictnil(v)) |
|
#define | isrealasize(t) (!((t)->flags & BITRAS)) |
|
#define | ivalue(o) check_exp(ttisinteger(o), val_(o).i) |
|
#define | ivalueraw(v) ((v).i) |
|
#define | keyiscollectable(n) (keytt(n) & BIT_ISCOLLECTABLE) |
|
#define | keyisinteger(node) (keytt(node) == LUA_VNUMINT) |
|
#define | keyisnil(node) (keytt(node) == LUA_TNIL) |
|
#define | keyisshrstr(node) (keytt(node) == ctb(LUA_VSHRSTR)) |
|
#define | keyival(node) (keyval(node).i) |
|
#define | keystrval(node) (gco2ts(keyval(node).gc)) |
|
#define | keytt(node) ((node)->u.key_tt) |
|
#define | keyval(node) ((node)->u.key_val) |
|
#define | l_isfalse(o) (ttisfalse(o) || ttisnil(o)) |
|
#define | lmod(s, size) (check_exp((size&(size-1))==0, (cast_int((s) & ((size)-1))))) |
|
#define | LUA_TOTALTYPES (LUA_TPROTO + 2) |
|
#define | LUA_TPROTO (LUA_NUMTYPES+1) /* function prototypes */ |
|
#define | LUA_TUPVAL LUA_NUMTYPES /* upvalues */ |
|
#define | LUA_VABSTKEY makevariant(LUA_TNIL, 2) |
|
#define | LUA_VCCL makevariant(LUA_TFUNCTION, 2) /* C closure */ |
|
#define | LUA_VEMPTY makevariant(LUA_TNIL, 1) |
|
#define | LUA_VFALSE makevariant(LUA_TBOOLEAN, 0) |
|
#define | LUA_VLCF makevariant(LUA_TFUNCTION, 1) /* light C function */ |
|
#define | LUA_VLCL makevariant(LUA_TFUNCTION, 0) /* Lua closure */ |
|
#define | LUA_VLIGHTUSERDATA makevariant(LUA_TLIGHTUSERDATA, 0) |
|
#define | LUA_VLNGSTR makevariant(LUA_TSTRING, 1) /* long strings */ |
|
#define | LUA_VNIL makevariant(LUA_TNIL, 0) |
|
#define | LUA_VNUMFLT makevariant(LUA_TNUMBER, 1) /* float numbers */ |
|
#define | LUA_VNUMINT makevariant(LUA_TNUMBER, 0) /* integer numbers */ |
|
#define | LUA_VPROTO makevariant(LUA_TPROTO, 0) |
|
#define | LUA_VSHRSTR makevariant(LUA_TSTRING, 0) /* short strings */ |
|
#define | LUA_VTABLE makevariant(LUA_TTABLE, 0) |
|
#define | LUA_VTHREAD makevariant(LUA_TTHREAD, 0) |
|
#define | LUA_VTRUE makevariant(LUA_TBOOLEAN, 1) |
|
#define | LUA_VUPVAL makevariant(LUA_TUPVAL, 0) |
|
#define | LUA_VUSERDATA makevariant(LUA_TUSERDATA, 0) |
|
#define | makevariant(t, v) ((t) | ((v) << 4)) |
|
#define | novariant(t) ((t) & 0x0F) |
|
#define | nvalue(o) |
|
#define | pvalue(o) check_exp(ttislightuserdata(o), val_(o).p) |
|
#define | pvalueraw(v) ((v).p) |
|
#define | rawtt(o) ((o)->tt_) |
|
#define | righttt(obj) (ttypetag(obj) == gcvalue(obj)->tt) |
|
#define | s2v(o) (&(o)->val) |
|
#define | setbfvalue(obj) settt_(obj, LUA_VFALSE) |
|
#define | setbtvalue(obj) settt_(obj, LUA_VTRUE) |
|
#define | setclCvalue(L, obj, x) |
|
#define | setclLvalue(L, obj, x) |
|
#define | setclLvalue2s(L, o, cl) setclLvalue(L,s2v(o),cl) |
|
#define | setdeadkey(n) (keytt(n) = LUA_TTABLE, gckey(n) = NULL) |
|
#define | setempty(v) settt_(v, LUA_VEMPTY) |
|
#define | setfltvalue(obj, x) { TValue *io=(obj); val_(io).n=(x); settt_(io, LUA_VNUMFLT); } |
|
#define | setfvalue(obj, x) { TValue *io=(obj); val_(io).f=(x); settt_(io, LUA_VLCF); } |
|
#define | setgcovalue(L, obj, x) |
|
#define | sethvalue(L, obj, x) |
|
#define | sethvalue2s(L, o, h) sethvalue(L,s2v(o),h) |
|
#define | setivalue(obj, x) { TValue *io=(obj); val_(io).i=(x); settt_(io, LUA_VNUMINT); } |
|
#define | setnilkey(node) (keytt(node) = LUA_TNIL) |
|
#define | setnilvalue(obj) settt_(obj, LUA_VNIL) |
|
#define | setnodekey(L, node, obj) |
|
#define | setnorealasize(t) ((t)->flags |= BITRAS) |
|
#define | setobj(L, obj1, obj2) |
|
#define | setobj2n setobj |
|
#define | setobj2s(L, o1, o2) setobj(L,s2v(o1),o2) |
|
#define | setobj2t setobj |
|
#define | setobjs2s(L, o1, o2) setobj(L,s2v(o1),s2v(o2)) |
|
#define | setobjt2t setobj |
|
#define | setpvalue(obj, x) { TValue *io=(obj); val_(io).p=(x); settt_(io, LUA_VLIGHTUSERDATA); } |
|
#define | setrealasize(t) ((t)->flags &= cast_byte(~BITRAS)) |
|
#define | setsvalue(L, obj, x) |
|
#define | setsvalue2n setsvalue |
|
#define | setsvalue2s(L, o, s) setsvalue(L,s2v(o),s) |
|
#define | setthvalue(L, obj, x) |
|
#define | setthvalue2s(L, o, t) setthvalue(L,s2v(o),t) |
|
#define | settt_(o, t) ((o)->tt_=(t)) |
|
#define | setuvalue(L, obj, x) |
|
#define | sizenode(t) (twoto((t)->lsizenode)) |
|
#define | sizeudata(nuv, nb) (udatamemoffset(nuv) + (nb)) |
|
#define | svalue(o) getstr(tsvalue(o)) |
|
#define | thvalue(o) check_exp(ttisthread(o), gco2th(val_(o).gc)) |
|
#define | tsslen(s) ((s)->tt == LUA_VSHRSTR ? (s)->shrlen : (s)->u.lnglen) |
|
#define | tsvalue(o) check_exp(ttisstring(o), gco2ts(val_(o).gc)) |
|
#define | tsvalueraw(v) (gco2ts((v).gc)) |
|
#define | ttisboolean(o) checktype((o), LUA_TBOOLEAN) |
|
#define | ttisCclosure(o) checktag((o), ctb(LUA_VCCL)) |
|
#define | ttisclosure(o) ((rawtt(o) & 0x1F) == LUA_VLCL) |
|
#define | ttisfalse(o) checktag((o), LUA_VFALSE) |
|
#define | ttisfloat(o) checktag((o), LUA_VNUMFLT) |
|
#define | ttisfulluserdata(o) checktag((o), ctb(LUA_VUSERDATA)) |
|
#define | ttisfunction(o) checktype(o, LUA_TFUNCTION) |
|
#define | ttisinteger(o) checktag((o), LUA_VNUMINT) |
|
#define | ttislcf(o) checktag((o), LUA_VLCF) |
|
#define | ttisLclosure(o) checktag((o), ctb(LUA_VLCL)) |
|
#define | ttislightuserdata(o) checktag((o), LUA_VLIGHTUSERDATA) |
|
#define | ttislngstring(o) checktag((o), ctb(LUA_VLNGSTR)) |
|
#define | ttisnil(v) checktype((v), LUA_TNIL) |
|
#define | ttisnumber(o) checktype((o), LUA_TNUMBER) |
|
#define | ttisshrstring(o) checktag((o), ctb(LUA_VSHRSTR)) |
|
#define | ttisstrictnil(o) checktag((o), LUA_VNIL) |
|
#define | ttisstring(o) checktype((o), LUA_TSTRING) |
|
#define | ttistable(o) checktag((o), ctb(LUA_VTABLE)) |
|
#define | ttisthread(o) checktag((o), ctb(LUA_VTHREAD)) |
|
#define | ttistrue(o) checktag((o), LUA_VTRUE) |
|
#define | ttype(o) (novariant(rawtt(o))) |
|
#define | ttypetag(o) withvariant(rawtt(o)) |
|
#define | TValuefields Value value_; lu_byte tt_ |
|
#define | twoto(x) (1<<(x)) |
|
#define | udatamemoffset(nuv) |
|
#define | UTF8BUFFSZ 8 |
|
#define | uvalue(o) check_exp(ttisfulluserdata(o), gco2u(val_(o).gc)) |
|
#define | val_(o) ((o)->value_) |
|
#define | valraw(o) (&val_(o)) |
|
#define | vslen(o) tsslen(tsvalue(o)) |
|
#define | withvariant(t) ((t) & 0x3F) |
|