lua/lstate.h File Reference

#include "lua.h"
#include "lobject.h"
#include "ltm.h"
#include "lzio.h"

Go to the source code of this file.

Data Structures

struct  stringtable
struct  CallInfo
struct  global_State
struct  lua_State
union  GCObject

Defines

#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)
#define CI_HASFRAME   (1<<1)
#define CI_CALLING   (1<<2)
#define CI_SAVEDPC   (1<<3)
#define CI_YIELD   (1<<4)
#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)))

Functions

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


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

Definition at line 100 of file lstate.h.

Referenced by callrethooks(), lua_getstack(), lua_yield(), luaD_precall(), resume(), stack_init(), and traversestack().

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

Definition at line 106 of file lstate.h.

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

#define CI_YIELD   (1<<4)

Definition at line 107 of file lstate.h.

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

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

Definition at line 46 of file lstate.h.

Referenced by f_luaopen(), lua_getmetatable(), lua_setmetatable(), luaH_new(), luaS_newudata(), and markroot().

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

Definition at line 178 of file lstate.h.

Referenced by Arith(), checkSizes(), close_state(), f_luaopen(), freeobj(), lua_atpanic(), lua_close(), lua_getgccount(), lua_getgcthreshold(), lua_setgcthreshold(), luaC_callGCTM(), luaC_link(), luaC_separateudata(), luaC_sweep(), luaD_throw(), luaM_realloc(), luaS_freeall(), luaS_newlstr(), luaS_newudata(), luaS_resize(), luaT_gettmbyobj(), luaT_init(), luaV_concat(), mark(), newlstr(), resize(), setnodevector(), and sweepstrings().

#define gcotocl (  )     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 (  )     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 (  )     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 (  )     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 (  )     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 (  )     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 (  )     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->_gt)

Definition at line 49 of file lstate.h.

Referenced by Arith(), f_luaopen(), f_parser(), lua_getfenv(), luaE_newthread(), negindex(), preinit_state(), traversestack(), and travglobals().

#define lua_lock (  )     ((void) 0)

Definition at line 28 of file lstate.h.

Referenced by DumpBlock(), lua_atpanic(), lua_call(), lua_checkstack(), lua_close(), lua_concat(), lua_cpcall(), lua_dump(), lua_equal(), lua_error(), lua_getfenv(), lua_getgccount(), lua_getgcthreshold(), lua_getinfo(), lua_getlocal(), lua_getmetatable(), lua_getstack(), lua_gettable(), lua_getupvalue(), lua_insert(), lua_lessthan(), lua_load(), lua_newtable(), lua_newthread(), lua_newuserdata(), lua_next(), lua_pcall(), lua_pushboolean(), lua_pushcclosure(), lua_pushfstring(), lua_pushlightuserdata(), lua_pushlstring(), lua_pushnil(), lua_pushnumber(), lua_pushupvalues(), lua_pushvalue(), lua_pushvfstring(), lua_rawget(), lua_rawgeti(), lua_rawset(), lua_rawseti(), lua_remove(), lua_replace(), lua_resume(), lua_setfenv(), lua_setgcthreshold(), lua_setlocal(), lua_setmetatable(), lua_settable(), lua_settop(), lua_setupvalue(), lua_strlen(), lua_tostring(), lua_xmove(), lua_yield(), luaD_callhook(), and luaD_precall().

#define lua_unlock (  )     ((void) 0)

Definition at line 32 of file lstate.h.

Referenced by DumpBlock(), lua_atpanic(), lua_call(), lua_checkstack(), lua_concat(), lua_cpcall(), lua_dump(), lua_equal(), lua_error(), lua_getfenv(), lua_getgccount(), lua_getgcthreshold(), lua_getinfo(), lua_getlocal(), lua_getmetatable(), lua_getstack(), lua_gettable(), lua_getupvalue(), lua_insert(), lua_lessthan(), lua_load(), lua_newtable(), lua_newthread(), lua_newuserdata(), lua_next(), lua_pcall(), lua_pushboolean(), lua_pushcclosure(), lua_pushfstring(), lua_pushlightuserdata(), lua_pushlstring(), lua_pushnil(), lua_pushnumber(), lua_pushupvalues(), lua_pushvalue(), lua_pushvfstring(), lua_rawget(), lua_rawgeti(), lua_rawset(), lua_rawseti(), lua_remove(), lua_replace(), lua_resume(), lua_setfenv(), lua_setgcthreshold(), lua_setlocal(), lua_setmetatable(), lua_settable(), lua_settop(), lua_setupvalue(), lua_strlen(), lua_tostring(), lua_xmove(), lua_yield(), luaD_callhook(), luaD_precall(), and resume_error().

#define lua_userstateopen (  ) 

Definition at line 37 of file lstate.h.

Referenced by lua_newthread(), and lua_open().

#define ngcotouv (  )     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 (  )     (&G(L)->_registry)

Definition at line 52 of file lstate.h.

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

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

Definition at line 208 of file lstate.h.

Referenced by luaE_newthread(), luaF_close(), luaF_findupval(), luaF_newCclosure(), luaF_newLclosure(), luaF_newproto(), luaH_new(), luaS_newudata(), newlstr(), and traversetable().


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


Generated on Fri Oct 12 08:44:56 2007 for rpm by  doxygen 1.5.2