Ardour  9.0-pre0-582-g084a23a80d
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  GCObject
 
union  Value
 
struct  lua_TValue
 
struct  TString
 
union  UTString
 
struct  Udata
 
union  UUdata
 
struct  Upvaldesc
 
struct  LocVar
 
struct  Proto
 
struct  CClosure
 
struct  LClosure
 
union  Closure
 
union  TKey
 
struct  Node
 
struct  Table
 

Macros

#define LUA_TPROTO   LUA_NUMTAGS /* function prototypes */
 
#define LUA_TDEADKEY   (LUA_NUMTAGS+1) /* removed keys in tables */
 
#define LUA_TOTALTAGS   (LUA_TPROTO + 2)
 
#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 LUA_TNUMFLT   (LUA_TNUMBER | (0 << 4)) /* float numbers */
 
#define LUA_TNUMINT   (LUA_TNUMBER | (1 << 4)) /* integer numbers */
 
#define BIT_ISCOLLECTABLE   (1 << 6)
 
#define ctb(t)   ((t) | BIT_ISCOLLECTABLE)
 
#define CommonHeader   GCObject *next; lu_byte tt; lu_byte marked
 
#define TValuefields   Value value_; int tt_
 
#define NILCONSTANT   {NULL}, LUA_TNIL
 
#define val_(o)   ((o)->value_)
 
#define rttype(o)   ((o)->tt_)
 
#define novariant(x)   ((x) & 0x0F)
 
#define ttype(o)   (rttype(o) & 0x3F)
 
#define ttnov(o)   (novariant(rttype(o)))
 
#define checktag(o, t)   (rttype(o) == (t))
 
#define checktype(o, t)   (ttnov(o) == (t))
 
#define ttisnumber(o)   checktype((o), LUA_TNUMBER)
 
#define ttisfloat(o)   checktag((o), LUA_TNUMFLT)
 
#define ttisinteger(o)   checktag((o), LUA_TNUMINT)
 
#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 ttisfulluserdata(o)   checktag((o), ctb(LUA_TUSERDATA))
 
#define ttisthread(o)   checktag((o), ctb(LUA_TTHREAD))
 
#define ttisdeadkey(o)   checktag((o), LUA_TDEADKEY)
 
#define ivalue(o)   check_exp(ttisinteger(o), val_(o).i)
 
#define fltvalue(o)   check_exp(ttisfloat(o), val_(o).n)
 
#define nvalue(o)
 
#define gcvalue(o)   check_exp(iscollectable(o), val_(o).gc)
 
#define pvalue(o)   check_exp(ttislightuserdata(o), val_(o).p)
 
#define tsvalue(o)   check_exp(ttisstring(o), gco2ts(val_(o).gc))
 
#define uvalue(o)   check_exp(ttisfulluserdata(o), gco2u(val_(o).gc))
 
#define clvalue(o)   check_exp(ttisclosure(o), gco2cl(val_(o).gc))
 
#define clLvalue(o)   check_exp(ttisLclosure(o), gco2lcl(val_(o).gc))
 
#define clCvalue(o)   check_exp(ttisCclosure(o), gco2ccl(val_(o).gc))
 
#define fvalue(o)   check_exp(ttislcf(o), val_(o).f)
 
#define hvalue(o)   check_exp(ttistable(o), gco2t(val_(o).gc))
 
#define bvalue(o)   check_exp(ttisboolean(o), val_(o).b)
 
#define thvalue(o)   check_exp(ttisthread(o), gco2th(val_(o).gc))
 
#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)->tt)
 
#define checkliveness(L, obj)
 
#define settt_(o, t)   ((o)->tt_=(t))
 
#define setfltvalue(obj, x)    { TValue *io=(obj); val_(io).n=(x); settt_(io, LUA_TNUMFLT); }
 
#define chgfltvalue(obj, x)    { TValue *io=(obj); lua_assert(ttisfloat(io)); val_(io).n=(x); }
 
#define setivalue(obj, x)    { TValue *io=(obj); val_(io).i=(x); settt_(io, LUA_TNUMINT); }
 
#define chgivalue(obj, x)    { TValue *io=(obj); lua_assert(ttisinteger(io)); val_(io).i=(x); }
 
#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 setobj2n   setobj
 
#define setsvalue2n   setsvalue
 
#define setobj2t(L, o1, o2)   ((void)L, *(o1)=*(o2), checkliveness(L,(o1)))
 
#define getstr(ts)    check_exp(sizeof((ts)->extra), cast(char *, (ts)) + sizeof(UTString))
 
#define svalue(o)   getstr(tsvalue(o))
 
#define tsslen(s)   ((s)->tt == LUA_TSHRSTR ? (s)->shrlen : (s)->u.lnglen)
 
#define vslen(o)   tsslen(tsvalue(o))
 
#define getudatamem(u)    check_exp(sizeof((u)->ttuv_), (cast(char*, (u)) + sizeof(UUdata)))
 
#define setuservalue(L, u, o)
 
#define getuservalue(L, u, o)
 
#define ClosureHeader    CommonHeader; lu_byte nupvalues; GCObject *gclist
 
#define isLfunction(o)   ttisLclosure(o)
 
#define getproto(o)   (clLvalue(o)->p)
 
#define setnodekey(L, key, obj)
 
#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_)
 
#define UTF8BUFFSZ   8
 

Typedefs

typedef struct GCObject GCObject
 
typedef union Value Value
 
typedef struct lua_TValue TValue
 
typedef TValueStkId
 
typedef struct TString TString
 
typedef union UTString UTString
 
typedef struct Udata Udata
 
typedef union UUdata UUdata
 
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

int luaO_int2fb (unsigned int x)
 
int luaO_fb2int (int x)
 
int luaO_utf8esc (char *buff, unsigned long x)
 
int luaO_ceillog2 (unsigned int x)
 
void luaO_arith (lua_State *L, int op, const TValue *p1, const TValue *p2, TValue *res)
 
size_t luaO_str2num (const char *s, TValue *o)
 
int luaO_hexavalue (int c)
 
void luaO_tostring (lua_State *L, StkId obj)
 
const char * luaO_pushvfstring (lua_State *L, const char *fmt, va_list argp)
 
const char * luaO_pushfstring (lua_State *L, const char *fmt,...)
 
void luaO_chunkid (char *out, const char *source, size_t len)
 

Variables

const TValue luaO_nilobject_
 

Macro Definition Documentation

◆ BIT_ISCOLLECTABLE

#define BIT_ISCOLLECTABLE   (1 << 6)

Definition at line 63 of file lobject.h.

◆ bvalue

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

Definition at line 176 of file lobject.h.

◆ checkliveness

#define checkliveness (   L,
  obj 
)
Value:
(righttt(obj) && (L == NULL || !isdead(G(L),gcvalue(obj)))))
#define isdead(g, v)
Definition: lgc.h:96
#define lua_longassert(c)
Definition: llimits.h:91
#define gcvalue(o)
Definition: lobject.h:167
#define righttt(obj)
Definition: lobject.h:188
#define iscollectable(o)
Definition: lobject.h:184
#define G(L)
Definition: lstate.h:205

Definition at line 190 of file lobject.h.

◆ checktag

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

Definition at line 140 of file lobject.h.

◆ checktype

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

Definition at line 141 of file lobject.h.

◆ chgfltvalue

#define chgfltvalue (   obj,
 
)     { TValue *io=(obj); lua_assert(ttisfloat(io)); val_(io).n=(x); }

Definition at line 201 of file lobject.h.

◆ chgivalue

#define chgivalue (   obj,
 
)     { TValue *io=(obj); lua_assert(ttisinteger(io)); val_(io).i=(x); }

Definition at line 207 of file lobject.h.

◆ clCvalue

#define clCvalue (   o)    check_exp(ttisCclosure(o), gco2ccl(val_(o).gc))

Definition at line 173 of file lobject.h.

◆ clLvalue

#define clLvalue (   o)    check_exp(ttisLclosure(o), gco2lcl(val_(o).gc))

Definition at line 172 of file lobject.h.

◆ ClosureHeader

#define ClosureHeader    CommonHeader; lu_byte nupvalues; GCObject *gclist

Definition at line 443 of file lobject.h.

◆ clvalue

#define clvalue (   o)    check_exp(ttisclosure(o), gco2cl(val_(o).gc))

Definition at line 171 of file lobject.h.

◆ CommonHeader

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

Definition at line 79 of file lobject.h.

◆ ctb

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

Definition at line 66 of file lobject.h.

◆ deadvalue

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

Definition at line 179 of file lobject.h.

◆ fltvalue

#define fltvalue (   o)    check_exp(ttisfloat(o), val_(o).n)

Definition at line 164 of file lobject.h.

◆ fvalue

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

Definition at line 174 of file lobject.h.

◆ gcvalue

#define gcvalue (   o)    check_exp(iscollectable(o), val_(o).gc)

Definition at line 167 of file lobject.h.

◆ getproto

#define getproto (   o)    (clLvalue(o)->p)

Definition at line 468 of file lobject.h.

◆ getstr

#define getstr (   ts)     check_exp(sizeof((ts)->extra), cast(char *, (ts)) + sizeof(UTString))

Definition at line 328 of file lobject.h.

◆ getudatamem

#define getudatamem (   u)     check_exp(sizeof((u)->ttuv_), (cast(char*, (u)) + sizeof(UUdata)))

Definition at line 368 of file lobject.h.

◆ getuservalue

#define getuservalue (   L,
  u,
 
)
Value:
{ TValue *io=(o); const Udata *iu = (u); \
io->value_ = iu->user_; settt_(io, iu->ttuv_); \
checkliveness(L,io); }
#define settt_(o, t)
Definition: lobject.h:196
Definition: lobject.h:346
union Value user_
Definition: lobject.h:351
lu_byte ttuv_
Definition: lobject.h:348

Definition at line 377 of file lobject.h.

◆ hvalue

#define hvalue (   o)    check_exp(ttistable(o), gco2t(val_(o).gc))

Definition at line 175 of file lobject.h.

◆ iscollectable

#define iscollectable (   o)    (rttype(o) & BIT_ISCOLLECTABLE)

Definition at line 184 of file lobject.h.

◆ isLfunction

#define isLfunction (   o)    ttisLclosure(o)

Definition at line 466 of file lobject.h.

◆ ivalue

#define ivalue (   o)    check_exp(ttisinteger(o), val_(o).i)

Definition at line 163 of file lobject.h.

◆ l_isfalse

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

Definition at line 181 of file lobject.h.

◆ lmod

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

Definition at line 514 of file lobject.h.

◆ LUA_TCCL

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

Definition at line 49 of file lobject.h.

◆ LUA_TDEADKEY

#define LUA_TDEADKEY   (LUA_NUMTAGS+1) /* removed keys in tables */

Definition at line 23 of file lobject.h.

◆ LUA_TLCF

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

Definition at line 48 of file lobject.h.

◆ LUA_TLCL

#define LUA_TLCL   (LUA_TFUNCTION | (0 << 4)) /* Lua closure */

Definition at line 47 of file lobject.h.

◆ LUA_TLNGSTR

#define LUA_TLNGSTR   (LUA_TSTRING | (1 << 4)) /* long strings */

Definition at line 54 of file lobject.h.

◆ LUA_TNUMFLT

#define LUA_TNUMFLT   (LUA_TNUMBER | (0 << 4)) /* float numbers */

Definition at line 58 of file lobject.h.

◆ LUA_TNUMINT

#define LUA_TNUMINT   (LUA_TNUMBER | (1 << 4)) /* integer numbers */

Definition at line 59 of file lobject.h.

◆ LUA_TOTALTAGS

#define LUA_TOTALTAGS   (LUA_TPROTO + 2)

Definition at line 28 of file lobject.h.

◆ LUA_TPROTO

#define LUA_TPROTO   LUA_NUMTAGS /* function prototypes */

Definition at line 22 of file lobject.h.

◆ LUA_TSHRSTR

#define LUA_TSHRSTR   (LUA_TSTRING | (0 << 4)) /* short strings */

Definition at line 53 of file lobject.h.

◆ luaO_nilobject

#define luaO_nilobject   (&luaO_nilobject_)

Definition at line 525 of file lobject.h.

◆ NILCONSTANT

#define NILCONSTANT   {NULL}, LUA_TNIL

Definition at line 120 of file lobject.h.

◆ novariant

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

Definition at line 130 of file lobject.h.

◆ nvalue

#define nvalue (   o)
Value:
#define cast_num(i)
Definition: llimits.h:115
#define check_exp(c, e)
Definition: llimits.h:90
#define ttisnumber(o)
Definition: lobject.h:142
#define fltvalue(o)
Definition: lobject.h:164
#define ttisinteger(o)
Definition: lobject.h:144
#define ivalue(o)
Definition: lobject.h:163

Definition at line 165 of file lobject.h.

◆ pvalue

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

Definition at line 168 of file lobject.h.

◆ righttt

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

Definition at line 188 of file lobject.h.

◆ rttype

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

Definition at line 127 of file lobject.h.

◆ setbvalue

#define setbvalue (   obj,
 
)     { TValue *io=(obj); val_(io).b=(x); settt_(io, LUA_TBOOLEAN); }

Definition at line 218 of file lobject.h.

◆ setclCvalue

#define setclCvalue (   L,
  obj,
 
)
Value:
{ TValue *io = (obj); CClosure *x_ = (x); \
val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TCCL)); \
checkliveness(L,io); }
#define ctb(t)
Definition: lobject.h:66
#define LUA_TCCL
Definition: lobject.h:49
#define obj2gco(v)
Definition: lstate.h:238

Definition at line 245 of file lobject.h.

◆ setclLvalue

#define setclLvalue (   L,
  obj,
 
)
Value:
{ TValue *io = (obj); LClosure *x_ = (x); \
val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TLCL)); \
checkliveness(L,io); }
#define LUA_TLCL
Definition: lobject.h:47

Definition at line 240 of file lobject.h.

◆ setdeadvalue

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

Definition at line 255 of file lobject.h.

◆ setfltvalue

#define setfltvalue (   obj,
 
)     { TValue *io=(obj); val_(io).n=(x); settt_(io, LUA_TNUMFLT); }

Definition at line 198 of file lobject.h.

◆ setfvalue

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

Definition at line 212 of file lobject.h.

◆ setgcovalue

#define setgcovalue (   L,
  obj,
 
)
Value:
{ TValue *io = (obj); GCObject *i_g=(x); \
val_(io).gc = i_g; settt_(io, ctb(i_g->tt)); }
lu_byte tt
Definition: lobject.h:86

Definition at line 221 of file lobject.h.

◆ sethvalue

#define sethvalue (   L,
  obj,
 
)
Value:
{ TValue *io = (obj); Table *x_ = (x); \
val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TTABLE)); \
checkliveness(L,io); }
#define LUA_TTABLE
Definition: lua-5.3.5/lua.h:69
Definition: lobject.h:497

Definition at line 250 of file lobject.h.

◆ sethvalue2s

#define sethvalue2s   sethvalue

Definition at line 273 of file lobject.h.

◆ setivalue

#define setivalue (   obj,
 
)     { TValue *io=(obj); val_(io).i=(x); settt_(io, LUA_TNUMINT); }

Definition at line 204 of file lobject.h.

◆ setnilvalue

#define setnilvalue (   obj)    settt_(obj, LUA_TNIL)

Definition at line 210 of file lobject.h.

◆ setnodekey

#define setnodekey (   L,
  key,
  obj 
)
Value:
{ TKey *k_=(key); const TValue *io_=(obj); \
k_->nk.value_ = io_->value_; k_->nk.tt_ = io_->tt_; \
(void)L; checkliveness(L,io_); }
#define checkliveness(L, obj)
Definition: lobject.h:190
Value value_
Definition: lobject.h:114
int tt_
Definition: lobject.h:114
Definition: lobject.h:475
struct TKey::@32 nk
int tt_
Definition: lobject.h:477

Definition at line 485 of file lobject.h.

◆ setobj

#define setobj (   L,
  obj1,
  obj2 
)
Value:
{ TValue *io1=(obj1); *io1 = *(obj2); \
(void)L; checkliveness(L,io1); }

Definition at line 259 of file lobject.h.

◆ setobj2n

#define setobj2n   setobj

Definition at line 278 of file lobject.h.

◆ setobj2s

#define setobj2s   setobj

Definition at line 271 of file lobject.h.

◆ setobj2t

#define setobj2t (   L,
  o1,
  o2 
)    ((void)L, *(o1)=*(o2), checkliveness(L,(o1)))

Definition at line 282 of file lobject.h.

◆ setobjs2s

#define setobjs2s   setobj

Definition at line 269 of file lobject.h.

◆ setobjt2t

#define setobjt2t   setobj

Definition at line 276 of file lobject.h.

◆ setptvalue2s

#define setptvalue2s   setptvalue

Definition at line 274 of file lobject.h.

◆ setpvalue

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

Definition at line 215 of file lobject.h.

◆ setsvalue

#define setsvalue (   L,
  obj,
 
)
Value:
{ TValue *io = (obj); TString *x_ = (x); \
val_(io).gc = obj2gco(x_); settt_(io, ctb(x_->tt)); \
checkliveness(L,io); }
lu_byte tt
Definition: lobject.h:304

Definition at line 225 of file lobject.h.

◆ setsvalue2n

#define setsvalue2n   setsvalue

Definition at line 279 of file lobject.h.

◆ setsvalue2s

#define setsvalue2s   setsvalue

Definition at line 272 of file lobject.h.

◆ setthvalue

#define setthvalue (   L,
  obj,
 
)
Value:
{ TValue *io = (obj); lua_State *x_ = (x); \
val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TTHREAD)); \
checkliveness(L,io); }
#define LUA_TTHREAD
Definition: lua-5.3.5/lua.h:72

Definition at line 235 of file lobject.h.

◆ settt_

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

Definition at line 196 of file lobject.h.

◆ setuservalue

#define setuservalue (   L,
  u,
 
)
Value:
{ const TValue *io=(o); Udata *iu = (u); \
iu->user_ = io->value_; iu->ttuv_ = rttype(io); \
checkliveness(L,io); }
#define rttype(o)
Definition: lobject.h:127

Definition at line 371 of file lobject.h.

◆ setuvalue

#define setuvalue (   L,
  obj,
 
)
Value:
{ TValue *io = (obj); Udata *x_ = (x); \
val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_TUSERDATA)); \
checkliveness(L,io); }
#define LUA_TUSERDATA
Definition: lua-5.3.5/lua.h:71

Definition at line 230 of file lobject.h.

◆ sizenode

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

Definition at line 519 of file lobject.h.

◆ svalue

#define svalue (   o)    getstr(tsvalue(o))

Definition at line 333 of file lobject.h.

◆ thvalue

#define thvalue (   o)    check_exp(ttisthread(o), gco2th(val_(o).gc))

Definition at line 177 of file lobject.h.

◆ tsslen

#define tsslen (   s)    ((s)->tt == LUA_TSHRSTR ? (s)->shrlen : (s)->u.lnglen)

Definition at line 336 of file lobject.h.

◆ tsvalue

#define tsvalue (   o)    check_exp(ttisstring(o), gco2ts(val_(o).gc))

Definition at line 169 of file lobject.h.

◆ ttisboolean

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

Definition at line 146 of file lobject.h.

◆ ttisCclosure

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

Definition at line 154 of file lobject.h.

◆ ttisclosure

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

Definition at line 153 of file lobject.h.

◆ ttisdeadkey

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

Definition at line 159 of file lobject.h.

◆ ttisfloat

#define ttisfloat (   o)    checktag((o), LUA_TNUMFLT)

Definition at line 143 of file lobject.h.

◆ ttisfulluserdata

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

Definition at line 157 of file lobject.h.

◆ ttisfunction

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

Definition at line 152 of file lobject.h.

◆ ttisinteger

#define ttisinteger (   o)    checktag((o), LUA_TNUMINT)

Definition at line 144 of file lobject.h.

◆ ttislcf

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

Definition at line 156 of file lobject.h.

◆ ttisLclosure

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

Definition at line 155 of file lobject.h.

◆ ttislightuserdata

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

Definition at line 147 of file lobject.h.

◆ ttislngstring

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

Definition at line 150 of file lobject.h.

◆ ttisnil

#define ttisnil (   o)    checktag((o), LUA_TNIL)

Definition at line 145 of file lobject.h.

◆ ttisnumber

#define ttisnumber (   o)    checktype((o), LUA_TNUMBER)

Definition at line 142 of file lobject.h.

◆ ttisshrstring

#define ttisshrstring (   o)    checktag((o), ctb(LUA_TSHRSTR))

Definition at line 149 of file lobject.h.

◆ ttisstring

#define ttisstring (   o)    checktype((o), LUA_TSTRING)

Definition at line 148 of file lobject.h.

◆ ttistable

#define ttistable (   o)    checktag((o), ctb(LUA_TTABLE))

Definition at line 151 of file lobject.h.

◆ ttisthread

#define ttisthread (   o)    checktag((o), ctb(LUA_TTHREAD))

Definition at line 158 of file lobject.h.

◆ ttnov

#define ttnov (   o)    (novariant(rttype(o)))

Definition at line 136 of file lobject.h.

◆ ttype

#define ttype (   o)    (rttype(o) & 0x3F)

Definition at line 133 of file lobject.h.

◆ TValuefields

#define TValuefields   Value value_; int tt_

Definition at line 110 of file lobject.h.

◆ twoto

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

Definition at line 518 of file lobject.h.

◆ UTF8BUFFSZ

#define UTF8BUFFSZ   8

Definition at line 531 of file lobject.h.

◆ uvalue

#define uvalue (   o)    check_exp(ttisfulluserdata(o), gco2u(val_(o).gc))

Definition at line 170 of file lobject.h.

◆ val_

#define val_ (   o)    ((o)->value_)

Definition at line 123 of file lobject.h.

◆ vslen

#define vslen (   o)    tsslen(tsvalue(o))

Definition at line 339 of file lobject.h.

Typedef Documentation

◆ CClosure

typedef struct CClosure CClosure

◆ Closure

typedef union Closure Closure

◆ GCObject

typedef struct GCObject GCObject

Definition at line 1 of file lobject.h.

◆ LClosure

typedef struct LClosure LClosure

◆ LocVar

typedef struct LocVar LocVar

◆ Node

typedef struct Node Node

◆ Proto

typedef struct Proto Proto

◆ StkId

typedef TValue* StkId

Definition at line 294 of file lobject.h.

◆ Table

typedef struct Table Table

◆ TKey

typedef union TKey TKey

◆ TString

typedef struct TString TString

◆ TValue

typedef struct lua_TValue TValue

◆ Udata

typedef struct Udata Udata

◆ UpVal

typedef struct UpVal UpVal

Definition at line 294 of file lobject.h.

◆ Upvaldesc

typedef struct Upvaldesc Upvaldesc

◆ UTString

typedef union UTString UTString

◆ UUdata

typedef union UUdata UUdata

◆ Value

typedef union Value Value

Function Documentation

◆ luaO_arith()

void luaO_arith ( lua_State L,
int  op,
const TValue p1,
const TValue p2,
TValue res 
)

◆ luaO_ceillog2()

int luaO_ceillog2 ( unsigned int  x)

◆ luaO_chunkid()

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

◆ luaO_fb2int()

int luaO_fb2int ( int  x)

◆ luaO_hexavalue()

int luaO_hexavalue ( int  c)

◆ luaO_int2fb()

int luaO_int2fb ( unsigned int  x)

◆ luaO_pushfstring()

const char* luaO_pushfstring ( lua_State L,
const char *  fmt,
  ... 
)

◆ luaO_pushvfstring()

const char* luaO_pushvfstring ( lua_State L,
const char *  fmt,
va_list  argp 
)

◆ luaO_str2num()

size_t luaO_str2num ( const char *  s,
TValue o 
)

◆ luaO_tostring()

void luaO_tostring ( lua_State L,
StkId  obj 
)

◆ luaO_utf8esc()

int luaO_utf8esc ( char *  buff,
unsigned long  x 
)

Variable Documentation

◆ luaO_nilobject_

const TValue luaO_nilobject_
extern