Classes | Macros | Typedefs | Functions
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  AbsLineInfo
 
struct  CClosure
 
union  Closure
 
struct  GCObject
 
struct  LClosure
 
struct  LocVar
 
union  Node
 
struct  Node::NodeKey
 
struct  Proto
 
union  StackValue
 
struct  Table
 
struct  TString
 
struct  TValue
 
struct  Udata
 
struct  Udata0
 
struct  UpVal
 
struct  Upvaldesc
 
union  UValue
 
union  Value
 

Macros

#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 keyisdead(node)   (keytt(node) == LUA_TDEADKEY)
 
#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_TDEADKEY   (LUA_NUMTYPES+2) /* removed keys in tables */
 
#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(node)   (keytt(node) = LUA_TDEADKEY)
 
#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)   (ttisLclosure(o) || ttisCclosure(o))
 
#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)
 

Typedefs

typedef struct AbsLineInfo AbsLineInfo
 
typedef struct CClosure CClosure
 
typedef union Closure Closure
 
typedef struct GCObject GCObject
 
typedef struct LClosure LClosure
 
typedef struct LocVar LocVar
 
typedef union Node Node
 
typedef struct Proto Proto
 
typedef union StackValue StackValue
 
typedef StackValueStkId
 
typedef struct Table Table
 
typedef struct TString TString
 
typedef struct TValue TValue
 
typedef struct Udata Udata
 
typedef struct Udata0 Udata0
 
typedef struct UpVal UpVal
 
typedef struct Upvaldesc Upvaldesc
 
typedef union UValue UValue
 
typedef union Value Value
 

Functions

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

Macro Definition Documentation

◆ ABSTKEYCONSTANT

#define ABSTKEYCONSTANT   {NULL}, LUA_VABSTKEY

Definition at line 208 of file lobject.h.

◆ BIT_ISCOLLECTABLE

#define BIT_ISCOLLECTABLE   (1 << 6)

Definition at line 285 of file lobject.h.

◆ BITRAS

#define BITRAS   (1 << 7)

Definition at line 718 of file lobject.h.

◆ checkliveness

#define checkliveness (   L,
  obj 
)
Value:
(righttt(obj) && (L == NULL || !isdead(G(L),gcvalue(obj))))))

Definition at line 104 of file lobject.h.

◆ checktag

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

Definition at line 89 of file lobject.h.

◆ checktype

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

Definition at line 90 of file lobject.h.

◆ chgfltvalue

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

Definition at line 328 of file lobject.h.

◆ chgivalue

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

Definition at line 334 of file lobject.h.

◆ clCvalue

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

Definition at line 593 of file lobject.h.

◆ clLvalue

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

Definition at line 591 of file lobject.h.

◆ ClosureHeader

#define ClosureHeader   CommonHeader; lu_byte nupvalues; GCObject *gclist

Definition at line 631 of file lobject.h.

◆ clvalue

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

Definition at line 590 of file lobject.h.

◆ CommonHeader

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

Definition at line 275 of file lobject.h.

◆ ctb

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

Definition at line 290 of file lobject.h.

◆ fltvalue

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

Definition at line 319 of file lobject.h.

◆ fltvalueraw

#define fltvalueraw (   v)    ((v).n)

Definition at line 322 of file lobject.h.

◆ fvalue

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

Definition at line 592 of file lobject.h.

◆ fvalueraw

#define fvalueraw (   v)    ((v).f)

Definition at line 595 of file lobject.h.

◆ gckey

#define gckey (   n)    (keyval(n).gc)

Definition at line 753 of file lobject.h.

◆ gckeyN

#define gckeyN (   n)    (keyiscollectable(n) ? gckey(n) : NULL)

Definition at line 754 of file lobject.h.

◆ gcvalue

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

Definition at line 292 of file lobject.h.

◆ gcvalueraw

#define gcvalueraw (   v)    ((v).gc)

Definition at line 294 of file lobject.h.

◆ getnodekey

#define getnodekey (   L,
  obj,
  node 
)
Value:
{ TValue *io_=(obj); const Node *n_=(node); \
io_->value_ = n_->u.key_val; io_->tt_ = n_->u.key_tt; \
checkliveness(L,io_); }

Definition at line 705 of file lobject.h.

◆ getproto

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

Definition at line 654 of file lobject.h.

◆ getstr

#define getstr (   ts)    ((ts)->contents)

Definition at line 390 of file lobject.h.

◆ getudatamem

#define getudatamem (   u)    (cast_charp(u) + udatamemoffset((u)->nuvalue))

Definition at line 482 of file lobject.h.

◆ hvalue

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

Definition at line 669 of file lobject.h.

◆ isabstkey

#define isabstkey (   v)    checktag((v), LUA_VABSTKEY)

Definition at line 190 of file lobject.h.

◆ iscollectable

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

Definition at line 287 of file lobject.h.

◆ isempty

#define isempty (   v)    ttisnil(v)

Definition at line 204 of file lobject.h.

◆ isLfunction

#define isLfunction (   o)    ttisLclosure(o)

Definition at line 588 of file lobject.h.

◆ isnonstrictnil

#define isnonstrictnil (   v)    (ttisnil(v) && !ttisstrictnil(v))

Definition at line 196 of file lobject.h.

◆ isrealasize

#define isrealasize (   t)    (!((t)->flags & BITRAS))

Definition at line 719 of file lobject.h.

◆ ivalue

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

Definition at line 320 of file lobject.h.

◆ ivalueraw

#define ivalueraw (   v)    ((v).i)

Definition at line 323 of file lobject.h.

◆ keyiscollectable

#define keyiscollectable (   n)    (keytt(n) & BIT_ISCOLLECTABLE)

Definition at line 751 of file lobject.h.

◆ keyisdead

#define keyisdead (   node)    (keytt(node) == LUA_TDEADKEY)

Definition at line 764 of file lobject.h.

◆ keyisinteger

#define keyisinteger (   node)    (keytt(node) == LUA_VNUMINT)

Definition at line 744 of file lobject.h.

◆ keyisnil

#define keyisnil (   node)    (keytt(node) == LUA_TNIL)

Definition at line 743 of file lobject.h.

◆ keyisshrstr

#define keyisshrstr (   node)    (keytt(node) == ctb(LUA_VSHRSTR))

Definition at line 746 of file lobject.h.

◆ keyival

#define keyival (   node)    (keyval(node).i)

Definition at line 745 of file lobject.h.

◆ keystrval

#define keystrval (   node)    (gco2ts(keyval(node).gc))

Definition at line 747 of file lobject.h.

◆ keytt

#define keytt (   node)    ((node)->u.key_tt)

Definition at line 740 of file lobject.h.

◆ keyval

#define keyval (   node)    ((node)->u.key_val)

Definition at line 741 of file lobject.h.

◆ l_isfalse

#define l_isfalse (   o)    (ttisfalse(o) || ttisnil(o))

Definition at line 234 of file lobject.h.

◆ lmod

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

Definition at line 773 of file lobject.h.

◆ LUA_TDEADKEY

#define LUA_TDEADKEY   (LUA_NUMTYPES+2) /* removed keys in tables */

Definition at line 24 of file lobject.h.

◆ LUA_TOTALTYPES

#define LUA_TOTALTYPES   (LUA_TPROTO + 2)

Definition at line 31 of file lobject.h.

◆ LUA_TPROTO

#define LUA_TPROTO   (LUA_NUMTYPES+1) /* function prototypes */

Definition at line 23 of file lobject.h.

◆ LUA_TUPVAL

#define LUA_TUPVAL   LUA_NUMTYPES /* upvalues */

Definition at line 22 of file lobject.h.

◆ LUA_VABSTKEY

#define LUA_VABSTKEY   makevariant(LUA_TNIL, 2)

Definition at line 176 of file lobject.h.

◆ LUA_VCCL

#define LUA_VCCL   makevariant(LUA_TFUNCTION, 2) /* C closure */

Definition at line 579 of file lobject.h.

◆ LUA_VEMPTY

#define LUA_VEMPTY   makevariant(LUA_TNIL, 1)

Definition at line 173 of file lobject.h.

◆ LUA_VFALSE

#define LUA_VFALSE   makevariant(LUA_TBOOLEAN, 0)

Definition at line 226 of file lobject.h.

◆ LUA_VLCF

#define LUA_VLCF   makevariant(LUA_TFUNCTION, 1) /* light C function */

Definition at line 578 of file lobject.h.

◆ LUA_VLCL

#define LUA_VLCL   makevariant(LUA_TFUNCTION, 0) /* Lua closure */

Definition at line 577 of file lobject.h.

◆ LUA_VLIGHTUSERDATA

#define LUA_VLIGHTUSERDATA   makevariant(LUA_TLIGHTUSERDATA, 0)

Definition at line 416 of file lobject.h.

◆ LUA_VLNGSTR

#define LUA_VLNGSTR   makevariant(LUA_TSTRING, 1) /* long strings */

Definition at line 348 of file lobject.h.

◆ LUA_VNIL

#define LUA_VNIL   makevariant(LUA_TNIL, 0)

Definition at line 170 of file lobject.h.

◆ LUA_VNUMFLT

#define LUA_VNUMFLT   makevariant(LUA_TNUMBER, 1) /* float numbers */

Definition at line 311 of file lobject.h.

◆ LUA_VNUMINT

#define LUA_VNUMINT   makevariant(LUA_TNUMBER, 0) /* integer numbers */

Definition at line 310 of file lobject.h.

◆ LUA_VPROTO

#define LUA_VPROTO   makevariant(LUA_TPROTO, 0)

Definition at line 496 of file lobject.h.

◆ LUA_VSHRSTR

#define LUA_VSHRSTR   makevariant(LUA_TSTRING, 0) /* short strings */

Definition at line 347 of file lobject.h.

◆ LUA_VTABLE

#define LUA_VTABLE   makevariant(LUA_TTABLE, 0)

Definition at line 665 of file lobject.h.

◆ LUA_VTHREAD

#define LUA_VTHREAD   makevariant(LUA_TTHREAD, 0)

Definition at line 249 of file lobject.h.

◆ LUA_VTRUE

#define LUA_VTRUE   makevariant(LUA_TBOOLEAN, 1)

Definition at line 227 of file lobject.h.

◆ LUA_VUPVAL

#define LUA_VUPVAL   makevariant(LUA_TUPVAL, 0)

Definition at line 573 of file lobject.h.

◆ LUA_VUSERDATA

#define LUA_VUSERDATA   makevariant(LUA_TUSERDATA, 0)

Definition at line 418 of file lobject.h.

◆ makevariant

#define makevariant (   t,
 
)    ((t) | ((v) << 4))

Definition at line 42 of file lobject.h.

◆ novariant

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

Definition at line 78 of file lobject.h.

◆ nvalue

#define nvalue (   o)
Value:

Definition at line 317 of file lobject.h.

◆ pvalue

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

Definition at line 423 of file lobject.h.

◆ pvalueraw

#define pvalueraw (   v)    ((v).p)

Definition at line 426 of file lobject.h.

◆ rawtt

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

Definition at line 75 of file lobject.h.

◆ righttt

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

Definition at line 96 of file lobject.h.

◆ s2v

#define s2v (   o)    (&(o)->val)

Definition at line 159 of file lobject.h.

◆ setbfvalue

#define setbfvalue (   obj)    settt_(obj, LUA_VFALSE)

Definition at line 237 of file lobject.h.

◆ setbtvalue

#define setbtvalue (   obj)    settt_(obj, LUA_VTRUE)

Definition at line 238 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_VCCL)); \
checkliveness(L,io); }

Definition at line 607 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_VLCL)); \
checkliveness(L,io); }

Definition at line 597 of file lobject.h.

◆ setclLvalue2s

#define setclLvalue2s (   L,
  o,
  cl 
)    setclLvalue(L,s2v(o),cl)

Definition at line 602 of file lobject.h.

◆ setdeadkey

#define setdeadkey (   node)    (keytt(node) = LUA_TDEADKEY)

Definition at line 763 of file lobject.h.

◆ setempty

#define setempty (   v)    settt_(v, LUA_VEMPTY)

Definition at line 212 of file lobject.h.

◆ setfltvalue

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

Definition at line 325 of file lobject.h.

◆ setfvalue

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

Definition at line 604 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)); }

Definition at line 296 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_VTABLE)); \
checkliveness(L,io); }

Definition at line 671 of file lobject.h.

◆ sethvalue2s

#define sethvalue2s (   L,
  o,
 
)    sethvalue(L,s2v(o),h)

Definition at line 676 of file lobject.h.

◆ setivalue

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

Definition at line 331 of file lobject.h.

◆ setnilkey

#define setnilkey (   node)    (keytt(node) = LUA_TNIL)

Definition at line 749 of file lobject.h.

◆ setnilvalue

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

Definition at line 187 of file lobject.h.

◆ setnodekey

#define setnodekey (   L,
  node,
  obj 
)
Value:
{ Node *n_=(node); const TValue *io_=(obj); \
n_->u.key_val = io_->value_; n_->u.key_tt = io_->tt_; \
checkliveness(L,io_); }

Definition at line 698 of file lobject.h.

◆ setnorealasize

#define setnorealasize (   t)    ((t)->flags |= BITRAS)

Definition at line 721 of file lobject.h.

◆ setobj

#define setobj (   L,
  obj1,
  obj2 
)
Value:
{ TValue *io1=(obj1); const TValue *io2=(obj2); \
io1->value_ = io2->value_; settt_(io1, io2->tt_); \
checkliveness(L,io1); lua_assert(!isnonstrictnil(io1)); }

Definition at line 116 of file lobject.h.

◆ setobj2n

#define setobj2n   setobj

Definition at line 133 of file lobject.h.

◆ setobj2s

#define setobj2s (   L,
  o1,
  o2 
)    setobj(L,s2v(o1),o2)

Definition at line 129 of file lobject.h.

◆ setobj2t

#define setobj2t   setobj

Definition at line 135 of file lobject.h.

◆ setobjs2s

#define setobjs2s (   L,
  o1,
  o2 
)    setobj(L,s2v(o1),s2v(o2))

Definition at line 127 of file lobject.h.

◆ setobjt2t

#define setobjt2t   setobj

Definition at line 131 of file lobject.h.

◆ setpvalue

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

Definition at line 428 of file lobject.h.

◆ setrealasize

#define setrealasize (   t)    ((t)->flags &= cast_byte(~BITRAS))

Definition at line 720 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); }

Definition at line 358 of file lobject.h.

◆ setsvalue2n

#define setsvalue2n   setsvalue

Definition at line 367 of file lobject.h.

◆ setsvalue2s

#define setsvalue2s (   L,
  o,
  s 
)    setsvalue(L,s2v(o),s)

Definition at line 364 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_VTHREAD)); \
checkliveness(L,io); }

Definition at line 255 of file lobject.h.

◆ setthvalue2s

#define setthvalue2s (   L,
  o,
 
)    setthvalue(L,s2v(o),t)

Definition at line 260 of file lobject.h.

◆ settt_

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

Definition at line 112 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_VUSERDATA)); \
checkliveness(L,io); }

Definition at line 431 of file lobject.h.

◆ sizenode

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

Definition at line 778 of file lobject.h.

◆ sizeudata

#define sizeudata (   nuv,
  nb 
)    (udatamemoffset(nuv) + (nb))

Definition at line 485 of file lobject.h.

◆ svalue

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

Definition at line 394 of file lobject.h.

◆ thvalue

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

Definition at line 253 of file lobject.h.

◆ tsslen

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

Definition at line 397 of file lobject.h.

◆ tsvalue

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

Definition at line 356 of file lobject.h.

◆ tsvalueraw

#define tsvalueraw (   v)    (gco2ts((v).gc))

Definition at line 354 of file lobject.h.

◆ ttisboolean

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

Definition at line 229 of file lobject.h.

◆ ttisCclosure

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

Definition at line 584 of file lobject.h.

◆ ttisclosure

#define ttisclosure (   o)    (ttisLclosure(o) || ttisCclosure(o))

Definition at line 585 of file lobject.h.

◆ ttisfalse

#define ttisfalse (   o)    checktag((o), LUA_VFALSE)

Definition at line 230 of file lobject.h.

◆ ttisfloat

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

Definition at line 314 of file lobject.h.

◆ ttisfulluserdata

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

Definition at line 421 of file lobject.h.

◆ ttisfunction

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

Definition at line 581 of file lobject.h.

◆ ttisinteger

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

Definition at line 315 of file lobject.h.

◆ ttislcf

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

Definition at line 583 of file lobject.h.

◆ ttisLclosure

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

Definition at line 582 of file lobject.h.

◆ ttislightuserdata

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

Definition at line 420 of file lobject.h.

◆ ttislngstring

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

Definition at line 352 of file lobject.h.

◆ ttisnil

#define ttisnil (   v)    checktype((v), LUA_TNIL)

Definition at line 180 of file lobject.h.

◆ ttisnumber

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

Definition at line 313 of file lobject.h.

◆ ttisshrstring

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

Definition at line 351 of file lobject.h.

◆ ttisstrictnil

#define ttisstrictnil (   o)    checktag((o), LUA_VNIL)

Definition at line 184 of file lobject.h.

◆ ttisstring

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

Definition at line 350 of file lobject.h.

◆ ttistable

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

Definition at line 667 of file lobject.h.

◆ ttisthread

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

Definition at line 251 of file lobject.h.

◆ ttistrue

#define ttistrue (   o)    checktag((o), LUA_VTRUE)

Definition at line 231 of file lobject.h.

◆ ttype

#define ttype (   o)    (novariant(rawtt(o)))

Definition at line 85 of file lobject.h.

◆ ttypetag

#define ttypetag (   o)    withvariant(rawtt(o))

Definition at line 82 of file lobject.h.

◆ TValuefields

#define TValuefields   Value value_; lu_byte tt_

Definition at line 63 of file lobject.h.

◆ twoto

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

Definition at line 777 of file lobject.h.

◆ udatamemoffset

#define udatamemoffset (   nuv)
Value:
((nuv) == 0 ? offsetof(Udata0, bindata) \
: offsetof(Udata, uv) + (sizeof(UValue) * (nuv)))

Definition at line 477 of file lobject.h.

◆ UTF8BUFFSZ

#define UTF8BUFFSZ   8

Definition at line 782 of file lobject.h.

◆ uvalue

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

Definition at line 424 of file lobject.h.

◆ val_

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

Definition at line 70 of file lobject.h.

◆ valraw

#define valraw (   o)    (&val_(o))

Definition at line 71 of file lobject.h.

◆ vslen

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

Definition at line 400 of file lobject.h.

◆ withvariant

#define withvariant (   t)    ((t) & 0x3F)

Definition at line 81 of file lobject.h.

Typedef Documentation

◆ AbsLineInfo

typedef struct AbsLineInfo AbsLineInfo

◆ CClosure

typedef struct CClosure CClosure

◆ Closure

typedef union Closure Closure

◆ GCObject

typedef struct GCObject GCObject

◆ LClosure

typedef struct LClosure LClosure

◆ LocVar

typedef struct LocVar LocVar

◆ Node

typedef union Node Node

◆ Proto

typedef struct Proto Proto

◆ StackValue

typedef union StackValue StackValue

◆ StkId

typedef StackValue* StkId

Definition at line 156 of file lobject.h.

◆ Table

typedef struct Table Table

◆ TString

typedef struct TString TString

◆ TValue

typedef struct TValue TValue

◆ Udata

typedef struct Udata Udata

◆ Udata0

typedef struct Udata0 Udata0

◆ UpVal

typedef struct UpVal UpVal

◆ Upvaldesc

typedef struct Upvaldesc Upvaldesc

◆ UValue

typedef union UValue UValue

◆ Value

typedef union Value Value

Function Documentation

◆ luaO_arith()

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

Definition at line 126 of file lobject.c.

◆ luaO_ceillog2()

LUAI_FUNC int luaO_ceillog2 ( unsigned int  x)

Definition at line 35 of file lobject.c.

◆ luaO_chunkid()

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

Definition at line 557 of file lobject.c.

◆ luaO_hexavalue()

LUAI_FUNC int luaO_hexavalue ( int  c)

Definition at line 135 of file lobject.c.

◆ luaO_pushfstring()

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

Definition at line 539 of file lobject.c.

◆ luaO_pushvfstring()

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

Definition at line 470 of file lobject.c.

◆ luaO_rawarith()

LUAI_FUNC int luaO_rawarith ( lua_State L,
int  op,
const TValue p1,
const TValue p2,
TValue res 
)

Definition at line 89 of file lobject.c.

◆ luaO_str2num()

LUAI_FUNC size_t luaO_str2num ( const char *  s,
TValue o 
)

Definition at line 308 of file lobject.c.

◆ luaO_tostring()

LUAI_FUNC void luaO_tostring ( lua_State L,
TValue obj 
)

Definition at line 374 of file lobject.c.

◆ luaO_utf8esc()

LUAI_FUNC int luaO_utf8esc ( char *  buff,
unsigned long  x 
)

Definition at line 323 of file lobject.c.

LUA_VTHREAD
#define LUA_VTHREAD
Definition: lobject.h:249
lua_assert
#define lua_assert(c)
Definition: lauxlib.h:170
LClosure
Definition: lobject.h:641
TString
Definition: lobject.h:373
Node::NodeKey::key_tt
lu_byte key_tt
Definition: lobject.h:689
Node::NodeKey::key_val
Value key_val
Definition: lobject.h:691
obj2gco
#define obj2gco(v)
Definition: lstate.h:385
gcvalue
#define gcvalue(o)
Definition: lobject.h:292
ttisinteger
#define ttisinteger(o)
Definition: lobject.h:315
mqtt_test_proto.x
x
Definition: mqtt_test_proto.py:34
isnonstrictnil
#define isnonstrictnil(v)
Definition: lobject.h:196
LUA_VTABLE
#define LUA_VTABLE
Definition: lobject.h:665
sol::lib::io
@ io
UValue
union UValue UValue
fltvalue
#define fltvalue(o)
Definition: lobject.h:319
Udata
Definition: lobject.h:448
ivalue
#define ivalue(o)
Definition: lobject.h:320
Node::u
struct Node::NodeKey u
G
#define G(L)
Definition: lstate.h:330
lua_State
Definition: lstate.h:304
righttt
#define righttt(obj)
Definition: lobject.h:96
Udata0
Definition: lobject.h:467
nlohmann::detail::void
j template void())
Definition: json.hpp:4061
GCObject
Definition: lobject.h:279
CClosure
Definition: lobject.h:634
lua_longassert
#define lua_longassert(c)
Definition: llimits.h:103
isdead
#define isdead(g, v)
Definition: lgc.h:96
Node
Definition: lobject.h:686
ttisnumber
#define ttisnumber(o)
Definition: lobject.h:313
LUA_VLCL
#define LUA_VLCL
Definition: lobject.h:577
LUA_VCCL
#define LUA_VCCL
Definition: lobject.h:579
LUA_VUSERDATA
#define LUA_VUSERDATA
Definition: lobject.h:418
iscollectable
#define iscollectable(o)
Definition: lobject.h:287
Table
Definition: lobject.h:724
ctb
#define ctb(t)
Definition: lobject.h:290
cast_num
#define cast_num(i)
Definition: llimits.h:127
settt_
#define settt_(o, t)
Definition: lobject.h:112
check_exp
#define check_exp(c, e)
Definition: llimits.h:102
TValue
Definition: lobject.h:65


plotjuggler
Author(s): Davide Faconti
autogenerated on Mon Nov 11 2024 03:23:49