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 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)
 

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)
 
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_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

#define ABSTKEYCONSTANT   {NULL}, LUA_VABSTKEY

Definition at line 197 of file lobject.h.

#define BIT_ISCOLLECTABLE   (1 << 6)

Definition at line 274 of file lobject.h.

#define BITRAS   (1 << 7)

Definition at line 706 of file lobject.h.

#define checkliveness (   L,
  obj 
)
Value:
(righttt(obj) && (L == NULL || !isdead(G(L),gcvalue(obj))))))
#define gcvalue(o)
Definition: lobject.h:281
#define G(L)
Definition: lstate.h:332
#define righttt(obj)
Definition: lobject.h:94
#define isdead(g, v)
Definition: lgc.h:96
j template void())
Definition: json.hpp:3707
#define lua_longassert(c)
Definition: llimits.h:103
#define iscollectable(o)
Definition: lobject.h:276

Definition at line 102 of file lobject.h.

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

Definition at line 87 of file lobject.h.

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

Definition at line 88 of file lobject.h.

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

Definition at line 317 of file lobject.h.

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

Definition at line 323 of file lobject.h.

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

Definition at line 581 of file lobject.h.

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

Definition at line 579 of file lobject.h.

#define ClosureHeader   CommonHeader; lu_byte nupvalues; GCObject *gclist

Definition at line 619 of file lobject.h.

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

Definition at line 578 of file lobject.h.

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

Definition at line 264 of file lobject.h.

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

Definition at line 279 of file lobject.h.

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

Definition at line 308 of file lobject.h.

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

Definition at line 311 of file lobject.h.

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

Definition at line 580 of file lobject.h.

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

Definition at line 583 of file lobject.h.

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

Definition at line 741 of file lobject.h.

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

Definition at line 742 of file lobject.h.

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

Definition at line 281 of file lobject.h.

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

Definition at line 283 of file lobject.h.

#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_); }
lu_byte key_tt
Definition: lobject.h:677
Definition: lobject.h:63
Value key_val
Definition: lobject.h:679
struct Node::NodeKey u
#define checkliveness(L, obj)
Definition: lobject.h:102
Definition: lobject.h:674

Definition at line 693 of file lobject.h.

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

Definition at line 642 of file lobject.h.

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

Definition at line 379 of file lobject.h.

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

Definition at line 471 of file lobject.h.

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

Definition at line 657 of file lobject.h.

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

Definition at line 179 of file lobject.h.

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

Definition at line 276 of file lobject.h.

#define isempty (   v)    ttisnil(v)

Definition at line 193 of file lobject.h.

#define isLfunction (   o)    ttisLclosure(o)

Definition at line 576 of file lobject.h.

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

Definition at line 185 of file lobject.h.

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

Definition at line 707 of file lobject.h.

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

Definition at line 309 of file lobject.h.

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

Definition at line 312 of file lobject.h.

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

Definition at line 739 of file lobject.h.

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

Definition at line 732 of file lobject.h.

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

Definition at line 731 of file lobject.h.

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

Definition at line 734 of file lobject.h.

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

Definition at line 733 of file lobject.h.

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

Definition at line 735 of file lobject.h.

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

Definition at line 728 of file lobject.h.

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

Definition at line 729 of file lobject.h.

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

Definition at line 223 of file lobject.h.

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

Definition at line 761 of file lobject.h.

#define LUA_TOTALTYPES   (LUA_TPROTO + 2)

Definition at line 29 of file lobject.h.

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

Definition at line 23 of file lobject.h.

#define LUA_TUPVAL   LUA_NUMTYPES /* upvalues */

Definition at line 22 of file lobject.h.

#define LUA_VABSTKEY   makevariant(LUA_TNIL, 2)

Definition at line 165 of file lobject.h.

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

Definition at line 568 of file lobject.h.

#define LUA_VEMPTY   makevariant(LUA_TNIL, 1)

Definition at line 162 of file lobject.h.

#define LUA_VFALSE   makevariant(LUA_TBOOLEAN, 0)

Definition at line 215 of file lobject.h.

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

Definition at line 567 of file lobject.h.

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

Definition at line 566 of file lobject.h.

#define LUA_VLIGHTUSERDATA   makevariant(LUA_TLIGHTUSERDATA, 0)

Definition at line 405 of file lobject.h.

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

Definition at line 337 of file lobject.h.

#define LUA_VNIL   makevariant(LUA_TNIL, 0)

Definition at line 159 of file lobject.h.

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

Definition at line 300 of file lobject.h.

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

Definition at line 299 of file lobject.h.

#define LUA_VPROTO   makevariant(LUA_TPROTO, 0)

Definition at line 485 of file lobject.h.

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

Definition at line 336 of file lobject.h.

#define LUA_VTABLE   makevariant(LUA_TTABLE, 0)

Definition at line 653 of file lobject.h.

#define LUA_VTHREAD   makevariant(LUA_TTHREAD, 0)

Definition at line 238 of file lobject.h.

#define LUA_VTRUE   makevariant(LUA_TBOOLEAN, 1)

Definition at line 216 of file lobject.h.

#define LUA_VUPVAL   makevariant(LUA_TUPVAL, 0)

Definition at line 562 of file lobject.h.

#define LUA_VUSERDATA   makevariant(LUA_TUSERDATA, 0)

Definition at line 407 of file lobject.h.

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

Definition at line 40 of file lobject.h.

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

Definition at line 76 of file lobject.h.

#define nvalue (   o)
Value:
#define cast_num(i)
Definition: llimits.h:127
#define ttisinteger(o)
Definition: lobject.h:304
#define check_exp(c, e)
Definition: llimits.h:102
#define fltvalue(o)
Definition: lobject.h:308
#define ivalue(o)
Definition: lobject.h:309
#define ttisnumber(o)
Definition: lobject.h:302

Definition at line 306 of file lobject.h.

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

Definition at line 412 of file lobject.h.

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

Definition at line 415 of file lobject.h.

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

Definition at line 73 of file lobject.h.

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

Definition at line 94 of file lobject.h.

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

Definition at line 148 of file lobject.h.

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

Definition at line 226 of file lobject.h.

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

Definition at line 227 of file lobject.h.

#define setclCvalue (   L,
  obj,
 
)
Value:
{ TValue *io = (obj); CClosure *x_ = (x); \
val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_VCCL)); \
#define ctb(t)
Definition: lobject.h:279
#define obj2gco(v)
Definition: lstate.h:381
#define LUA_VCCL
Definition: lobject.h:568
#define val_(o)
Definition: lobject.h:68
Definition: lobject.h:63
#define checkliveness(L, obj)
Definition: lobject.h:102
#define settt_(o, t)
Definition: lobject.h:110

Definition at line 595 of file lobject.h.

#define setclLvalue (   L,
  obj,
 
)
Value:
{ TValue *io = (obj); LClosure *x_ = (x); \
val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_VLCL)); \
#define ctb(t)
Definition: lobject.h:279
#define obj2gco(v)
Definition: lstate.h:381
#define val_(o)
Definition: lobject.h:68
Definition: lobject.h:63
#define checkliveness(L, obj)
Definition: lobject.h:102
#define LUA_VLCL
Definition: lobject.h:566
#define settt_(o, t)
Definition: lobject.h:110

Definition at line 585 of file lobject.h.

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

Definition at line 590 of file lobject.h.

#define setdeadkey (   n)    (keytt(n) = LUA_TTABLE, gckey(n) = NULL)

Definition at line 752 of file lobject.h.

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

Definition at line 201 of file lobject.h.

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

Definition at line 314 of file lobject.h.

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

Definition at line 592 of file lobject.h.

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

Definition at line 285 of file lobject.h.

#define sethvalue (   L,
  obj,
 
)
Value:
{ TValue *io = (obj); Table *x_ = (x); \
val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_VTABLE)); \
#define ctb(t)
Definition: lobject.h:279
Definition: lobject.h:712
#define obj2gco(v)
Definition: lstate.h:381
#define val_(o)
Definition: lobject.h:68
Definition: lobject.h:63
#define LUA_VTABLE
Definition: lobject.h:653
#define checkliveness(L, obj)
Definition: lobject.h:102
#define settt_(o, t)
Definition: lobject.h:110

Definition at line 659 of file lobject.h.

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

Definition at line 664 of file lobject.h.

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

Definition at line 320 of file lobject.h.

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

Definition at line 737 of file lobject.h.

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

Definition at line 176 of file lobject.h.

#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_); }
lu_byte key_tt
Definition: lobject.h:677
Definition: lobject.h:63
struct Node::NodeKey u
#define checkliveness(L, obj)
Definition: lobject.h:102
Definition: lobject.h:674

Definition at line 686 of file lobject.h.

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

Definition at line 709 of file lobject.h.

#define setobj (   L,
  obj1,
  obj2 
)
Value:
{ TValue *io1=(obj1); const TValue *io2=(obj2); \
io1->value_ = io2->value_; settt_(io1, io2->tt_); \
Definition: lobject.h:63
#define isnonstrictnil(v)
Definition: lobject.h:185
#define lua_assert(c)
Definition: llimits.h:101
#define checkliveness(L, obj)
Definition: lobject.h:102
#define settt_(o, t)
Definition: lobject.h:110

Definition at line 114 of file lobject.h.

#define setobj2n   setobj

Definition at line 131 of file lobject.h.

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

Definition at line 127 of file lobject.h.

#define setobj2t   setobj

Definition at line 133 of file lobject.h.

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

Definition at line 125 of file lobject.h.

#define setobjt2t   setobj

Definition at line 129 of file lobject.h.

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

Definition at line 417 of file lobject.h.

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

Definition at line 708 of file lobject.h.

#define setsvalue (   L,
  obj,
 
)
Value:
{ TValue *io = (obj); TString *x_ = (x); \
val_(io).gc = obj2gco(x_); settt_(io, ctb(x_->tt)); \
#define ctb(t)
Definition: lobject.h:279
#define obj2gco(v)
Definition: lstate.h:381
#define val_(o)
Definition: lobject.h:68
Definition: lobject.h:63
#define checkliveness(L, obj)
Definition: lobject.h:102
#define settt_(o, t)
Definition: lobject.h:110

Definition at line 347 of file lobject.h.

#define setsvalue2n   setsvalue

Definition at line 356 of file lobject.h.

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

Definition at line 353 of file lobject.h.

#define setthvalue (   L,
  obj,
 
)
Value:
{ TValue *io = (obj); lua_State *x_ = (x); \
val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_VTHREAD)); \
#define ctb(t)
Definition: lobject.h:279
#define LUA_VTHREAD
Definition: lobject.h:238
#define obj2gco(v)
Definition: lstate.h:381
#define val_(o)
Definition: lobject.h:68
Definition: lobject.h:63
#define checkliveness(L, obj)
Definition: lobject.h:102
#define settt_(o, t)
Definition: lobject.h:110

Definition at line 244 of file lobject.h.

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

Definition at line 249 of file lobject.h.

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

Definition at line 110 of file lobject.h.

#define setuvalue (   L,
  obj,
 
)
Value:
{ TValue *io = (obj); Udata *x_ = (x); \
val_(io).gc = obj2gco(x_); settt_(io, ctb(LUA_VUSERDATA)); \
#define ctb(t)
Definition: lobject.h:279
#define obj2gco(v)
Definition: lstate.h:381
#define val_(o)
Definition: lobject.h:68
Definition: lobject.h:63
#define checkliveness(L, obj)
Definition: lobject.h:102
Definition: lobject.h:437
#define settt_(o, t)
Definition: lobject.h:110
#define LUA_VUSERDATA
Definition: lobject.h:407

Definition at line 420 of file lobject.h.

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

Definition at line 766 of file lobject.h.

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

Definition at line 474 of file lobject.h.

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

Definition at line 383 of file lobject.h.

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

Definition at line 242 of file lobject.h.

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

Definition at line 386 of file lobject.h.

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

Definition at line 345 of file lobject.h.

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

Definition at line 343 of file lobject.h.

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

Definition at line 218 of file lobject.h.

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

Definition at line 574 of file lobject.h.

#define ttisclosure (   o)    ((rawtt(o) & 0x1F) == LUA_VLCL)

Definition at line 571 of file lobject.h.

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

Definition at line 219 of file lobject.h.

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

Definition at line 303 of file lobject.h.

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

Definition at line 410 of file lobject.h.

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

Definition at line 570 of file lobject.h.

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

Definition at line 304 of file lobject.h.

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

Definition at line 573 of file lobject.h.

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

Definition at line 572 of file lobject.h.

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

Definition at line 409 of file lobject.h.

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

Definition at line 341 of file lobject.h.

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

Definition at line 169 of file lobject.h.

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

Definition at line 302 of file lobject.h.

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

Definition at line 340 of file lobject.h.

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

Definition at line 173 of file lobject.h.

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

Definition at line 339 of file lobject.h.

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

Definition at line 655 of file lobject.h.

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

Definition at line 240 of file lobject.h.

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

Definition at line 220 of file lobject.h.

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

Definition at line 83 of file lobject.h.

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

Definition at line 80 of file lobject.h.

#define TValuefields   Value value_; lu_byte tt_

Definition at line 61 of file lobject.h.

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

Definition at line 765 of file lobject.h.

#define udatamemoffset (   nuv)
Value:
((nuv) == 0 ? offsetof(Udata0, bindata) \
: offsetof(Udata, uv) + (sizeof(UValue) * (nuv)))
union UValue UValue
Definition: lobject.h:437

Definition at line 466 of file lobject.h.

#define UTF8BUFFSZ   8

Definition at line 770 of file lobject.h.

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

Definition at line 413 of file lobject.h.

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

Definition at line 68 of file lobject.h.

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

Definition at line 69 of file lobject.h.

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

Definition at line 389 of file lobject.h.

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

Definition at line 79 of file lobject.h.

Typedef Documentation

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 StackValue* StkId

Definition at line 145 of file lobject.h.

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

Function Documentation

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.

LUAI_FUNC int luaO_ceillog2 ( unsigned int  x)

Definition at line 35 of file lobject.c.

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

Definition at line 557 of file lobject.c.

LUAI_FUNC int luaO_hexavalue ( int  c)

Definition at line 135 of file lobject.c.

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

Definition at line 539 of file lobject.c.

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

Definition at line 470 of file lobject.c.

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.

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

Definition at line 308 of file lobject.c.

LUAI_FUNC void luaO_tostring ( lua_State L,
TValue obj 
)

Definition at line 374 of file lobject.c.

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

Definition at line 323 of file lobject.c.



plotjuggler
Author(s): Davide Faconti
autogenerated on Sun Dec 6 2020 04:02:48