The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Classes | Macros | Typedefs | Functions | Variables
lobject.h File Reference
#include <stdarg.h>
#include "llimits.h"
#include "lua.h"
Include dependency graph for lobject.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  GCheader
 
union  Value
 
struct  lua_TValue
 
union  TString
 
union  Udata
 
struct  Upvaldesc
 
struct  LocVar
 
struct  Proto
 
struct  UpVal
 
struct  CClosure
 
struct  LClosure
 
union  Closure
 
union  TKey
 
struct  Node
 
struct  Table
 

Macros

#define LUA_TPROTO   LUA_NUMTAGS
 
#define LUA_TUPVAL   (LUA_NUMTAGS+1)
 
#define LUA_TDEADKEY   (LUA_NUMTAGS+2)
 
#define LUA_TOTALTAGS   (LUA_TUPVAL+2)
 
#define VARBITS   (3 << 4)
 
#define LUA_TLCL   (LUA_TFUNCTION | (0 << 4)) /* Lua closure */
 
#define LUA_TLCF   (LUA_TFUNCTION | (1 << 4)) /* light C function */
 
#define LUA_TCCL   (LUA_TFUNCTION | (2 << 4)) /* C closure */
 
#define LUA_TSHRSTR   (LUA_TSTRING | (0 << 4)) /* short strings */
 
#define LUA_TLNGSTR   (LUA_TSTRING | (1 << 4)) /* long strings */
 
#define BIT_ISCOLLECTABLE   (1 << 6)
 
#define ctb(t)   ((t) | BIT_ISCOLLECTABLE)
 
#define CommonHeader   GCObject *next; lu_byte tt; lu_byte marked
 
#define numfield   lua_Number n; /* numbers */
 
#define TValuefields   Value value_; int tt_
 
#define NILCONSTANT   {NULL}, LUA_TNIL
 
#define val_(o)   ((o)->value_)
 
#define num_(o)   (val_(o).n)
 
#define rttype(o)   ((o)->tt_)
 
#define novariant(x)   ((x) & 0x0F)
 
#define ttype(o)   (rttype(o) & 0x3F)
 
#define ttypenv(o)   (novariant(rttype(o)))
 
#define checktag(o, t)   (rttype(o) == (t))
 
#define checktype(o, t)   (ttypenv(o) == (t))
 
#define ttisnumber(o)   checktag((o), LUA_TNUMBER)
 
#define ttisnil(o)   checktag((o), LUA_TNIL)
 
#define ttisboolean(o)   checktag((o), LUA_TBOOLEAN)
 
#define ttislightuserdata(o)   checktag((o), LUA_TLIGHTUSERDATA)
 
#define ttisstring(o)   checktype((o), LUA_TSTRING)
 
#define ttisshrstring(o)   checktag((o), ctb(LUA_TSHRSTR))
 
#define ttislngstring(o)   checktag((o), ctb(LUA_TLNGSTR))
 
#define ttistable(o)   checktag((o), ctb(LUA_TTABLE))
 
#define ttisfunction(o)   checktype(o, LUA_TFUNCTION)
 
#define ttisclosure(o)   ((rttype(o) & 0x1F) == LUA_TFUNCTION)
 
#define ttisCclosure(o)   checktag((o), ctb(LUA_TCCL))
 
#define ttisLclosure(o)   checktag((o), ctb(LUA_TLCL))
 
#define ttislcf(o)   checktag((o), LUA_TLCF)
 
#define ttisuserdata(o)   checktag((o), ctb(LUA_TUSERDATA))
 
#define ttisthread(o)   checktag((o), ctb(LUA_TTHREAD))
 
#define ttisdeadkey(o)   checktag((o), LUA_TDEADKEY)
 
#define ttisequal(o1, o2)   (rttype(o1) == rttype(o2))
 
#define nvalue(o)   check_exp(ttisnumber(o), num_(o))
 
#define gcvalue(o)   check_exp(iscollectable(o), val_(o).gc)
 
#define pvalue(o)   check_exp(ttislightuserdata(o), val_(o).p)
 
#define rawtsvalue(o)   check_exp(ttisstring(o), &val_(o).gc->ts)
 
#define tsvalue(o)   (&rawtsvalue(o)->tsv)
 
#define rawuvalue(o)   check_exp(ttisuserdata(o), &val_(o).gc->u)
 
#define uvalue(o)   (&rawuvalue(o)->uv)
 
#define clvalue(o)   check_exp(ttisclosure(o), &val_(o).gc->cl)
 
#define clLvalue(o)   check_exp(ttisLclosure(o), &val_(o).gc->cl.l)
 
#define clCvalue(o)   check_exp(ttisCclosure(o), &val_(o).gc->cl.c)
 
#define fvalue(o)   check_exp(ttislcf(o), val_(o).f)
 
#define hvalue(o)   check_exp(ttistable(o), &val_(o).gc->h)
 
#define bvalue(o)   check_exp(ttisboolean(o), val_(o).b)
 
#define thvalue(o)   check_exp(ttisthread(o), &val_(o).gc->th)
 
#define deadvalue(o)   check_exp(ttisdeadkey(o), cast(void *, val_(o).gc))
 
#define l_isfalse(o)   (ttisnil(o) || (ttisboolean(o) && bvalue(o) == 0))
 
#define iscollectable(o)   (rttype(o) & BIT_ISCOLLECTABLE)
 
#define righttt(obj)   (ttype(obj) == gcvalue(obj)->gch.tt)
 
#define checkliveness(g, obj)
 
#define settt_(o, t)   ((o)->tt_=(t))
 
#define setnvalue(obj, x)   { TValue *io=(obj); num_(io)=(x); settt_(io, LUA_TNUMBER); }
 
#define setnilvalue(obj)   settt_(obj, LUA_TNIL)
 
#define setfvalue(obj, x)   { TValue *io=(obj); val_(io).f=(x); settt_(io, LUA_TLCF); }
 
#define setpvalue(obj, x)   { TValue *io=(obj); val_(io).p=(x); settt_(io, LUA_TLIGHTUSERDATA); }
 
#define setbvalue(obj, x)   { TValue *io=(obj); val_(io).b=(x); settt_(io, LUA_TBOOLEAN); }
 
#define setgcovalue(L, obj, x)
 
#define setsvalue(L, obj, x)
 
#define setuvalue(L, obj, x)
 
#define setthvalue(L, obj, x)
 
#define setclLvalue(L, obj, x)
 
#define setclCvalue(L, obj, x)
 
#define sethvalue(L, obj, x)
 
#define setdeadvalue(obj)   settt_(obj, LUA_TDEADKEY)
 
#define setobj(L, obj1, obj2)
 
#define setobjs2s   setobj
 
#define setobj2s   setobj
 
#define setsvalue2s   setsvalue
 
#define sethvalue2s   sethvalue
 
#define setptvalue2s   setptvalue
 
#define setobjt2t   setobj
 
#define setobj2t   setobj
 
#define setobj2n   setobj
 
#define setsvalue2n   setsvalue
 
#define luai_checknum(L, o, c)   { /* empty */ }
 
#define getstr(ts)   cast(const char *, (ts) + 1)
 
#define svalue(o)   getstr(rawtsvalue(o))
 
#define ClosureHeader   CommonHeader; lu_byte nupvalues; GCObject *gclist
 
#define isLfunction(o)   ttisLclosure(o)
 
#define getproto(o)   (clLvalue(o)->p)
 
#define lmod(s, size)   (check_exp((size&(size-1))==0, (cast(int, (s) & ((size)-1)))))
 
#define twoto(x)   (1<<(x))
 
#define sizenode(t)   (twoto((t)->lsizenode))
 
#define luaO_nilobject   (&luaO_nilobject_)
 

Typedefs

typedef union GCObject GCObject
 
typedef struct GCheader GCheader
 
typedef union Value Value
 
typedef struct lua_TValue TValue
 
typedef TValueStkId
 
typedef union TString TString
 
typedef union Udata Udata
 
typedef struct Upvaldesc Upvaldesc
 
typedef struct LocVar LocVar
 
typedef struct Proto Proto
 
typedef struct UpVal UpVal
 
typedef struct CClosure CClosure
 
typedef struct LClosure LClosure
 
typedef union Closure Closure
 
typedef union TKey TKey
 
typedef struct Node Node
 
typedef struct Table Table
 

Functions

LUAI_FUNC int luaO_int2fb (unsigned int x)
 
LUAI_FUNC int luaO_fb2int (int x)
 
LUAI_FUNC int luaO_ceillog2 (unsigned int x)
 
LUAI_FUNC lua_Number luaO_arith (int op, lua_Number v1, lua_Number v2)
 
LUAI_FUNC int luaO_str2d (const char *s, size_t len, lua_Number *result)
 
LUAI_FUNC int luaO_hexavalue (int c)
 
LUAI_FUNC const char * luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp)
 
LUAI_FUNC const char * luaO_pushfstring (lua_State *L, const char *fmt,...)
 
LUAI_FUNC void luaO_chunkid (char *out, const char *source, size_t len)
 

Variables

LUAI_DDEC const TValue luaO_nilobject_
 

Macro Definition Documentation

#define BIT_ISCOLLECTABLE   (1 << 6)

Definition at line 60 of file lobject.h.

#define bvalue (   o)    check_exp(ttisboolean(o), val_(o).b)

Definition at line 164 of file lobject.h.

Referenced by DumpConstants(), luaV_equalobj_(), mainposition(), and PrintConstant().

#define checkliveness (   g,
  obj 
)
Value:
#define gcvalue(o)
Definition: lobject.h:153
GLboolean GLboolean g
Definition: glew.h:7319
#define righttt(obj)
Definition: lobject.h:176
GLhandleARB obj
Definition: glew.h:4486
#define isdead(g, v)
Definition: lgc.h:111
#define lua_longassert(c)
Definition: llimits.h:67
#define iscollectable(o)
Definition: lobject.h:172

Definition at line 178 of file lobject.h.

#define checktag (   o,
  t 
)    (rttype(o) == (t))

Definition at line 130 of file lobject.h.

#define checktype (   o,
  t 
)    (ttypenv(o) == (t))

Definition at line 131 of file lobject.h.

#define clCvalue (   o)    check_exp(ttisCclosure(o), &val_(o).gc->cl.c)
#define clLvalue (   o)    check_exp(ttisLclosure(o), &val_(o).gc->cl.l)
#define ClosureHeader   CommonHeader; lu_byte nupvalues; GCObject *gclist

Definition at line 512 of file lobject.h.

#define clvalue (   o)    check_exp(ttisclosure(o), &val_(o).gc->cl)

Definition at line 159 of file lobject.h.

Referenced by lua_getinfo().

#define CommonHeader   GCObject *next; lu_byte tt; lu_byte marked

Definition at line 76 of file lobject.h.

#define ctb (   t)    ((t) | BIT_ISCOLLECTABLE)

Definition at line 63 of file lobject.h.

#define deadvalue (   o)    check_exp(ttisdeadkey(o), cast(void *, val_(o).gc))

Definition at line 167 of file lobject.h.

Referenced by findindex().

#define fvalue (   o)    check_exp(ttislcf(o), val_(o).f)

Definition at line 162 of file lobject.h.

Referenced by lua_tocfunction(), lua_topointer(), luaD_precall(), luaV_equalobj_(), and mainposition().

#define gcvalue (   o)    check_exp(iscollectable(o), val_(o).gc)
#define getproto (   o)    (clLvalue(o)->p)

Definition at line 537 of file lobject.h.

Referenced by lua_dump(), and luaV_execute().

#define getstr (   ts)    cast(const char *, (ts) + 1)
#define hvalue (   o)    check_exp(ttistable(o), &val_(o).gc->h)
#define iscollectable (   o)    (rttype(o) & BIT_ISCOLLECTABLE)

Definition at line 172 of file lobject.h.

Referenced by findindex(), iscleared(), and luaV_equalobj_().

#define isLfunction (   o)    ttisLclosure(o)

Definition at line 535 of file lobject.h.

Referenced by lua_dump(), and lua_getlocal().

#define l_isfalse (   o)    (ttisnil(o) || (ttisboolean(o) && bvalue(o) == 0))

Definition at line 169 of file lobject.h.

Referenced by call_orderTM(), lua_toboolean(), luaV_equalobj_(), luaV_execute(), and luaV_finishOp().

#define lmod (   s,
  size 
)    (check_exp((size&(size-1))==0, (cast(int, (s) & ((size)-1)))))

Definition at line 576 of file lobject.h.

Referenced by internshrstr(), luaS_resize(), and newshrstr().

#define LUA_TCCL   (LUA_TFUNCTION | (2 << 4)) /* C closure */
#define LUA_TDEADKEY   (LUA_NUMTAGS+2)

Definition at line 23 of file lobject.h.

#define LUA_TLCF   (LUA_TFUNCTION | (1 << 4)) /* light C function */

Definition at line 50 of file lobject.h.

Referenced by lua_topointer(), luaD_precall(), luaV_equalobj_(), and mainposition().

#define LUA_TLCL   (LUA_TFUNCTION | (0 << 4)) /* Lua closure */
#define LUA_TLNGSTR   (LUA_TSTRING | (1 << 4)) /* long strings */
#define LUA_TOTALTAGS   (LUA_TUPVAL+2)

Definition at line 28 of file lobject.h.

#define LUA_TPROTO   LUA_NUMTAGS

Definition at line 21 of file lobject.h.

Referenced by freeobj(), luaF_newproto(), propagatemark(), and reallymarkobject().

#define LUA_TSHRSTR   (LUA_TSTRING | (0 << 4)) /* short strings */
#define LUA_TUPVAL   (LUA_NUMTAGS+1)

Definition at line 22 of file lobject.h.

Referenced by freeobj(), luaF_findupval(), luaF_newupval(), and reallymarkobject().

#define luai_checknum (   L,
  o,
  c 
)    { /* empty */ }

Definition at line 266 of file lobject.h.

Referenced by lua_pushnumber().

#define luaO_nilobject   (&luaO_nilobject_)
#define NILCONSTANT   {NULL}, LUA_TNIL

Definition at line 109 of file lobject.h.

#define novariant (   x)    ((x) & 0x0F)

Definition at line 120 of file lobject.h.

Referenced by luaC_newobj().

#define num_ (   o)    (val_(o).n)

Definition at line 113 of file lobject.h.

#define numfield   lua_Number n; /* numbers */

Definition at line 94 of file lobject.h.

#define nvalue (   o)    check_exp(ttisnumber(o), num_(o))
#define pvalue (   o)    check_exp(ttislightuserdata(o), val_(o).p)

Definition at line 154 of file lobject.h.

Referenced by lua_touserdata(), luaV_equalobj_(), and mainposition().

#define rawtsvalue (   o)    check_exp(ttisstring(o), &val_(o).gc->ts)
#define rawuvalue (   o)    check_exp(ttisuserdata(o), &val_(o).gc->u)

Definition at line 157 of file lobject.h.

Referenced by lua_setmetatable(), and lua_touserdata().

#define righttt (   obj)    (ttype(obj) == gcvalue(obj)->gch.tt)

Definition at line 176 of file lobject.h.

#define rttype (   o)    ((o)->tt_)

Definition at line 117 of file lobject.h.

#define setbvalue (   obj,
  x 
)    { TValue *io=(obj); val_(io).b=(x); settt_(io, LUA_TBOOLEAN); }
#define setclCvalue (   L,
  obj,
  x 
)
Value:
{ TValue *io=(obj); \
val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TCCL)); \
checkliveness(G(L),io); }
#define ctb(t)
Definition: lobject.h:63
#define LUA_TCCL
Definition: lobject.h:51
#define val_(o)
Definition: lobject.h:112
#define cast(t, exp)
Definition: llimits.h:92
#define G(L)
Definition: lstate.h:178
#define checkliveness(g, obj)
Definition: lobject.h:178
GLhandleARB obj
Definition: glew.h:4486
GLint GLint GLint GLint GLint x
Definition: glew.h:1220
#define settt_(o, t)
Definition: lobject.h:184

Definition at line 225 of file lobject.h.

Referenced by lua_pushcclosure().

#define setclLvalue (   L,
  obj,
  x 
)
Value:
{ TValue *io=(obj); \
val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TLCL)); \
checkliveness(G(L),io); }
#define ctb(t)
Definition: lobject.h:63
#define LUA_TLCL
Definition: lobject.h:49
#define val_(o)
Definition: lobject.h:112
#define cast(t, exp)
Definition: llimits.h:92
#define G(L)
Definition: lstate.h:178
#define checkliveness(g, obj)
Definition: lobject.h:178
GLhandleARB obj
Definition: glew.h:4486
GLint GLint GLint GLint GLint x
Definition: glew.h:1220
#define settt_(o, t)
Definition: lobject.h:184

Definition at line 220 of file lobject.h.

Referenced by luaU_undump(), luaV_execute(), luaY_parser(), and pushclosure().

#define setdeadvalue (   obj)    settt_(obj, LUA_TDEADKEY)

Definition at line 235 of file lobject.h.

Referenced by removeentry().

#define setfvalue (   obj,
  x 
)    { TValue *io=(obj); val_(io).f=(x); settt_(io, LUA_TLCF); }

Definition at line 191 of file lobject.h.

Referenced by lua_pushcclosure().

#define setgcovalue (   L,
  obj,
  x 
)
Value:
{ TValue *io=(obj); GCObject *i_g=(x); \
val_(io).gc=i_g; settt_(io, ctb(gch(i_g)->tt)); }
#define ctb(t)
Definition: lobject.h:63
#define val_(o)
Definition: lobject.h:112
GLhandleARB obj
Definition: glew.h:4486
#define gch(o)
Definition: lstate.h:196
GLint GLint GLint GLint GLint x
Definition: glew.h:1220
#define settt_(o, t)
Definition: lobject.h:184

Definition at line 200 of file lobject.h.

Referenced by GCTM().

#define sethvalue (   L,
  obj,
  x 
)
Value:
{ TValue *io=(obj); \
val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TTABLE)); \
checkliveness(G(L),io); }
#define ctb(t)
Definition: lobject.h:63
#define val_(o)
Definition: lobject.h:112
#define cast(t, exp)
Definition: llimits.h:92
#define G(L)
Definition: lstate.h:178
#define checkliveness(g, obj)
Definition: lobject.h:178
GLhandleARB obj
Definition: glew.h:4486
GLint GLint GLint GLint GLint x
Definition: glew.h:1220
#define settt_(o, t)
Definition: lobject.h:184
#define LUA_TTABLE
Definition: lua.h:82

Definition at line 230 of file lobject.h.

Referenced by collectvalidlines(), init_registry(), lua_createtable(), lua_getmetatable(), lua_getuservalue(), luaV_execute(), and nilK().

#define sethvalue2s   sethvalue

Definition at line 254 of file lobject.h.

Referenced by open_func().

#define setnilvalue (   obj)    settt_(obj, LUA_TNIL)
#define setnvalue (   obj,
  x 
)    { TValue *io=(obj); num_(io)=(x); settt_(io, LUA_TNUMBER); }
#define setobj (   L,
  obj1,
  obj2 
)
Value:
{ const TValue *io2=(obj2); TValue *io1=(obj1); \
io1->value_ = io2->value_; io1->tt_ = io2->tt_; \
checkliveness(G(L),io1); }
#define G(L)
Definition: lstate.h:178
#define checkliveness(g, obj)
Definition: lobject.h:178

Definition at line 239 of file lobject.h.

Referenced by addk(), lua_load(), lua_setupvalue(), luaF_close(), luaV_execute(), and moveto().

#define setobj2n   setobj

Definition at line 261 of file lobject.h.

Referenced by lua_pushcclosure().

#define setobj2s   setobj
#define setobj2t   setobj

Definition at line 259 of file lobject.h.

Referenced by lua_rawset(), lua_rawsetp(), luaH_newkey(), luaH_setint(), and luaV_settable().

#define setobjs2s   setobj
#define setobjt2t   setobj

Definition at line 257 of file lobject.h.

Referenced by luaH_resize().

#define setptvalue2s   setptvalue

Definition at line 255 of file lobject.h.

#define setpvalue (   obj,
  x 
)    { TValue *io=(obj); val_(io).p=(x); settt_(io, LUA_TLIGHTUSERDATA); }

Definition at line 194 of file lobject.h.

Referenced by lua_pushlightuserdata(), lua_rawgetp(), and lua_rawsetp().

#define setsvalue (   L,
  obj,
  x 
)
Value:
{ TValue *io=(obj); \
TString *x_ = (x); \
val_(io).gc=cast(GCObject *, x_); settt_(io, ctb(x_->tsv.tt)); \
checkliveness(G(L),io); }
#define ctb(t)
Definition: lobject.h:63
tformula< unsigned > x_
The x coordinate of the rectangle.
Definition: canvas.cpp:682
#define val_(o)
Definition: lobject.h:112
#define cast(t, exp)
Definition: llimits.h:92
#define G(L)
Definition: lstate.h:178
#define checkliveness(g, obj)
Definition: lobject.h:178
union TString TString
GLhandleARB obj
Definition: glew.h:4486
GLint GLint GLint GLint GLint x
Definition: glew.h:1220
#define settt_(o, t)
Definition: lobject.h:184

Definition at line 204 of file lobject.h.

Referenced by luaK_numberK(), and luaK_stringK().

#define setsvalue2n   setsvalue

Definition at line 262 of file lobject.h.

Referenced by LoadConstants().

#define setsvalue2s   setsvalue
#define setthvalue (   L,
  obj,
  x 
)
Value:
{ TValue *io=(obj); \
val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TTHREAD)); \
checkliveness(G(L),io); }
#define ctb(t)
Definition: lobject.h:63
#define LUA_TTHREAD
Definition: lua.h:85
#define val_(o)
Definition: lobject.h:112
#define cast(t, exp)
Definition: llimits.h:92
#define G(L)
Definition: lstate.h:178
#define checkliveness(g, obj)
Definition: lobject.h:178
GLhandleARB obj
Definition: glew.h:4486
GLint GLint GLint GLint GLint x
Definition: glew.h:1220
#define settt_(o, t)
Definition: lobject.h:184

Definition at line 215 of file lobject.h.

Referenced by init_registry(), lua_newthread(), and lua_pushthread().

#define settt_ (   o,
  t 
)    ((o)->tt_=(t))

Definition at line 184 of file lobject.h.

#define setuvalue (   L,
  obj,
  x 
)
Value:
{ TValue *io=(obj); \
val_(io).gc=cast(GCObject *, (x)); settt_(io, ctb(LUA_TUSERDATA)); \
checkliveness(G(L),io); }
#define ctb(t)
Definition: lobject.h:63
#define LUA_TUSERDATA
Definition: lua.h:84
#define val_(o)
Definition: lobject.h:112
#define cast(t, exp)
Definition: llimits.h:92
#define G(L)
Definition: lstate.h:178
#define checkliveness(g, obj)
Definition: lobject.h:178
GLhandleARB obj
Definition: glew.h:4486
GLint GLint GLint GLint GLint x
Definition: glew.h:1220
#define settt_(o, t)
Definition: lobject.h:184

Definition at line 210 of file lobject.h.

Referenced by lua_newuserdata().

#define sizenode (   t)    (twoto((t)->lsizenode))

Definition at line 581 of file lobject.h.

Referenced by luaH_free(), luaH_next(), luaH_resizearray(), numusehash(), and traversetable().

#define svalue (   o)    getstr(rawtsvalue(o))
#define thvalue (   o)    check_exp(ttisthread(o), &val_(o).gc->th)

Definition at line 165 of file lobject.h.

Referenced by lua_topointer(), and lua_tothread().

#define tsvalue (   o)    (&rawtsvalue(o)->tsv)

Definition at line 156 of file lobject.h.

Referenced by lua_rawlen(), lua_tolstring(), luaV_concat(), luaV_objlen(), and luaV_tonumber().

#define ttisboolean (   o)    checktag((o), LUA_TBOOLEAN)

Definition at line 134 of file lobject.h.

#define ttisCclosure (   o)    checktag((o), ctb(LUA_TCCL))

Definition at line 142 of file lobject.h.

Referenced by lua_iscfunction(), and lua_tocfunction().

#define ttisclosure (   o)    ((rttype(o) & 0x1F) == LUA_TFUNCTION)

Definition at line 141 of file lobject.h.

Referenced by lua_getinfo().

#define ttisdeadkey (   o)    checktag((o), LUA_TDEADKEY)

Definition at line 147 of file lobject.h.

Referenced by findindex().

#define ttisequal (   o1,
  o2 
)    (rttype(o1) == rttype(o2))

Definition at line 149 of file lobject.h.

Referenced by luaV_equalobj_().

#define ttisfunction (   o)    checktype(o, LUA_TFUNCTION)

Definition at line 140 of file lobject.h.

Referenced by GCTM(), lua_getinfo(), luaG_errormsg(), luaV_gettable(), luaV_settable(), and tryfuncTM().

#define ttislcf (   o)    checktag((o), LUA_TLCF)

Definition at line 144 of file lobject.h.

Referenced by index2addr(), lua_iscfunction(), and lua_tocfunction().

#define ttisLclosure (   o)    checktag((o), ctb(LUA_TLCL))

Definition at line 143 of file lobject.h.

Referenced by getupvalref().

#define ttislightuserdata (   o)    checktag((o), LUA_TLIGHTUSERDATA)

Definition at line 135 of file lobject.h.

Referenced by lua_isuserdata().

#define ttislngstring (   o)    checktag((o), ctb(LUA_TLNGSTR))

Definition at line 138 of file lobject.h.

#define ttisnil (   o)    checktag((o), LUA_TNIL)
#define ttisnumber (   o)    checktag((o), LUA_TNUMBER)
#define ttisshrstring (   o)    checktag((o), ctb(LUA_TSHRSTR))

Definition at line 137 of file lobject.h.

Referenced by luaH_getstr().

#define ttisstring (   o)    checktype((o), LUA_TSTRING)
#define ttistable (   o)    checktag((o), ctb(LUA_TTABLE))
#define ttisthread (   o)    checktag((o), ctb(LUA_TTHREAD))

Definition at line 146 of file lobject.h.

Referenced by lua_tothread().

#define ttisuserdata (   o)    checktag((o), ctb(LUA_TUSERDATA))

Definition at line 145 of file lobject.h.

Referenced by lua_getuservalue(), lua_isuserdata(), and lua_setuservalue().

#define ttype (   o)    (rttype(o) & 0x3F)
#define ttypenv (   o)    (novariant(rttype(o)))
#define TValuefields   Value value_; int tt_

Definition at line 103 of file lobject.h.

#define twoto (   x)    (1<<(x))

Definition at line 580 of file lobject.h.

Referenced by luaH_resize(), and setnodevector().

#define uvalue (   o)    (&rawuvalue(o)->uv)
#define val_ (   o)    ((o)->value_)

Definition at line 112 of file lobject.h.

#define VARBITS   (3 << 4)

Definition at line 38 of file lobject.h.

Typedef Documentation

typedef struct CClosure CClosure
typedef union Closure Closure
typedef struct GCheader GCheader
typedef union GCObject GCObject

Definition at line 69 of file lobject.h.

typedef struct LClosure LClosure
typedef struct LocVar LocVar
typedef struct Node Node
typedef struct Proto Proto
typedef TValue* StkId

Definition at line 401 of file lobject.h.

typedef struct Table Table
typedef union TKey TKey
typedef union TString TString
typedef struct lua_TValue TValue

Definition at line 105 of file lobject.h.

typedef union Udata Udata
typedef struct UpVal UpVal
typedef struct Upvaldesc Upvaldesc
typedef union Value Value

Definition at line 91 of file lobject.h.

Function Documentation

LUAI_FUNC lua_Number luaO_arith ( int  op,
lua_Number  v1,
lua_Number  v2 
)

Definition at line 72 of file lobject.cpp.

References lua_assert, LUA_OPADD, LUA_OPDIV, LUA_OPMOD, LUA_OPMUL, LUA_OPPOW, LUA_OPSUB, and LUA_OPUNM.

Referenced by constfolding(), lua_arith(), and luaV_arith().

LUAI_FUNC int luaO_ceillog2 ( unsigned int  x)

Definition at line 54 of file lobject.cpp.

Referenced by countint(), and setnodevector().

LUAI_FUNC void luaO_chunkid ( char *  out,
const char *  source,
size_t  len 
)

Definition at line 251 of file lobject.cpp.

References addstr, LL, POS, PRE, and RETS.

Referenced by addinfo(), funcinfo(), and lexerror().

LUAI_FUNC int luaO_fb2int ( int  x)

Definition at line 47 of file lobject.cpp.

References e.

Referenced by luaV_execute().

LUAI_FUNC int luaO_hexavalue ( int  c)

Definition at line 86 of file lobject.cpp.

References lisdigit, and ltolower.

Referenced by readhexa(), and readhexaesc().

LUAI_FUNC int luaO_int2fb ( unsigned int  x)

Definition at line 35 of file lobject.cpp.

References cast_int, and e.

Referenced by constructor().

LUAI_FUNC const char* luaO_pushfstring ( lua_State L,
const char *  fmt,
  ... 
)
LUAI_FUNC const char* luaO_pushvfstring ( lua_State L,
const char *  fmt,
va_list  argp 
)
LUAI_FUNC int luaO_str2d ( const char *  s,
size_t  len,
lua_Number result 
)

Definition at line 157 of file lobject.cpp.

References cast_uchar, lisspace, lua_str2number, and lua_strx2number().

Referenced by luaV_tonumber().

Variable Documentation

LUAI_DDEC const TValue luaO_nilobject_

Definition at line 590 of file lobject.h.