rpm  4.5
Data Structures | Macros | Typedefs | Functions
lstate.h File Reference
#include "lua.h"
#include "lobject.h"
#include "ltm.h"
#include "lzio.h"
Include dependency graph for lstate.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  stringtable
 
struct  CallInfo
 
struct  global_State
 
struct  lua_State
 
union  GCObject
 

Macros

#define lua_lock(L)   ((void) 0)
 
#define lua_unlock(L)   ((void) 0)
 
#define lua_userstateopen(l)
 
#define defaultmeta(L)   (&G(L)->_defaultmeta)
 
#define gt(L)   (&L->_gt)
 
#define registry(L)   (&G(L)->_registry)
 
#define EXTRA_STACK   5
 
#define BASIC_CI_SIZE   8
 
#define BASIC_STACK_SIZE   (2*LUA_MINSTACK)
 
#define CI_C   (1<<0) /* 1 if function is a C function */
 
#define CI_HASFRAME   (1<<1)
 
#define CI_CALLING   (1<<2)
 
#define CI_SAVEDPC   (1<<3) /* 1 if `savedpc' is updated */
 
#define CI_YIELD   (1<<4) /* 1 if thread is suspended */
 
#define ci_func(ci)   (clvalue((ci)->base - 1))
 
#define G(L)   (L->l_G)
 
#define gcotots(o)   check_exp((o)->gch.tt == LUA_TSTRING, &((o)->ts))
 
#define gcotou(o)   check_exp((o)->gch.tt == LUA_TUSERDATA, &((o)->u))
 
#define gcotocl(o)   check_exp((o)->gch.tt == LUA_TFUNCTION, &((o)->cl))
 
#define gcotoh(o)   check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h))
 
#define gcotop(o)   check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p))
 
#define gcotouv(o)   check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv))
 
#define ngcotouv(o)   check_exp((o) == NULL || (o)->gch.tt == LUA_TUPVAL, &((o)->uv))
 
#define gcototh(o)   check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th))
 
#define valtogco(v)   (cast(GCObject *, (v)))
 

Typedefs

typedef struct stringtable stringtable
 
typedef struct CallInfo CallInfo
 
typedef struct global_State global_State
 

Functions

lua_StateluaE_newthread (lua_State *L)
 
void luaE_freethread (lua_State *L, lua_State *L1)
 

Macro Definition Documentation

#define BASIC_CI_SIZE   8

Definition at line 59 of file lstate.h.

Referenced by stack_init().

#define BASIC_STACK_SIZE   (2*LUA_MINSTACK)

Definition at line 61 of file lstate.h.

Referenced by checkstacksizes(), and stack_init().

#define CI_C   (1<<0) /* 1 if function is a C function */
#define CI_CALLING   (1<<2)

Definition at line 105 of file lstate.h.

Referenced by luaD_call(), and luaV_execute().

#define ci_func (   ci)    (clvalue((ci)->base - 1))

Definition at line 110 of file lstate.h.

Referenced by currentline(), currentpc(), getfuncname(), getluaproto(), getobjname(), and traceexec().

#define CI_HASFRAME   (1<<1)

Definition at line 102 of file lstate.h.

Referenced by currentpc(), luaV_execute(), traceexec(), and traversestack().

#define CI_SAVEDPC   (1<<3) /* 1 if `savedpc' is updated */

Definition at line 106 of file lstate.h.

Referenced by luaD_precall(), luaV_execute(), resume(), and traversestack().

#define CI_YIELD   (1<<4) /* 1 if thread is suspended */

Definition at line 107 of file lstate.h.

Referenced by lua_resume(), lua_yield(), luaV_execute(), and resume().

#define defaultmeta (   L)    (&G(L)->_defaultmeta)
#define EXTRA_STACK   5

Definition at line 56 of file lstate.h.

Referenced by checkstacksizes(), luaD_growstack(), luaD_reallocstack(), and stack_init().

#define G (   L)    (L->l_G)
#define gcotocl (   o)    check_exp((o)->gch.tt == LUA_TFUNCTION, &((o)->cl))

Definition at line 199 of file lstate.h.

Referenced by freeobj(), propagatemarks(), and reallymarkobject().

#define gcotoh (   o)    check_exp((o)->gch.tt == LUA_TTABLE, &((o)->h))

Definition at line 200 of file lstate.h.

Referenced by cleartablekeys(), cleartablevalues(), freeobj(), propagatemarks(), and reallymarkobject().

#define gcotop (   o)    check_exp((o)->gch.tt == LUA_TPROTO, &((o)->p))

Definition at line 201 of file lstate.h.

Referenced by freeobj(), propagatemarks(), and reallymarkobject().

#define gcototh (   o)    check_exp((o)->gch.tt == LUA_TTHREAD, &((o)->th))

Definition at line 205 of file lstate.h.

Referenced by freeobj(), propagatemarks(), and reallymarkobject().

#define gcotots (   o)    check_exp((o)->gch.tt == LUA_TSTRING, &((o)->ts))

Definition at line 197 of file lstate.h.

Referenced by freeobj(), luaS_newlstr(), and luaS_resize().

#define gcotou (   o)    check_exp((o)->gch.tt == LUA_TUSERDATA, &((o)->u))

Definition at line 198 of file lstate.h.

Referenced by freeobj(), luaC_callGCTM(), luaC_separateudata(), and reallymarkobject().

#define gcotouv (   o)    check_exp((o)->gch.tt == LUA_TUPVAL, &((o)->uv))

Definition at line 202 of file lstate.h.

Referenced by correctstack(), and freeobj().

#define gt (   L)    (&L->_gt)
#define lua_lock (   L)    ((void) 0)
#define lua_unlock (   L)    ((void) 0)
#define lua_userstateopen (   l)

Definition at line 37 of file lstate.h.

Referenced by lua_newthread(), and lua_open().

#define ngcotouv (   o)    check_exp((o) == NULL || (o)->gch.tt == LUA_TUPVAL, &((o)->uv))

Definition at line 203 of file lstate.h.

Referenced by luaF_close(), and luaF_findupval().

#define registry (   L)    (&G(L)->_registry)

Definition at line 52 of file lstate.h.

Referenced by f_luaopen(), markroot(), and negindex().

#define valtogco (   v)    (cast(GCObject *, (v)))

Typedef Documentation

typedef struct CallInfo CallInfo
typedef struct global_State global_State
typedef struct stringtable stringtable

Function Documentation

void luaE_freethread ( lua_State L,
lua_State L1 
)

Definition at line 190 of file lstate.c.

References freestack(), freestate(), lua_assert, luaF_close(), lua_State::openupval, and lua_State::stack.

Referenced by freeobj().

lua_State* luaE_newthread ( lua_State L)

Definition at line 179 of file lstate.c.

References gt, lua_State::l_G, luaC_link(), mallocstate(), preinit_state(), setobj2n, stack_init(), and valtogco.

Referenced by lua_newthread().