#include <stddef.h>#include "lua.h"#include "ldebug.h"#include "ldo.h"#include "lfunc.h"#include "lgc.h"#include "llex.h"#include "lmem.h"#include "lstate.h"#include "lstring.h"#include "ltable.h"#include "ltm.h"Go to the source code of this file.
Classes | |
| struct | LG |
Defines | |
| #define | lstate_c |
| #define | LUA_CORE |
| #define | state_size(x) (sizeof(x) + LUAI_EXTRASPACE) |
| #define | fromstate(l) (cast(lu_byte *, (l)) - LUAI_EXTRASPACE) |
| #define | tostate(l) (cast(lua_State *, cast(lu_byte *, l) + LUAI_EXTRASPACE)) |
Functions | |
| static void | stack_init (lua_State *L1, lua_State *L) |
| static void | freestack (lua_State *L, lua_State *L1) |
| static void | f_luaopen (lua_State *L, void *ud) |
| static void | preinit_state (lua_State *L, global_State *g) |
| static void | close_state (lua_State *L) |
| lua_State * | luaE_newthread (lua_State *L) |
| void | luaE_freethread (lua_State *L, lua_State *L1) |
| LUA_API lua_State * | lua_newstate (lua_Alloc f, void *ud) |
| static void | callallgcTM (lua_State *L, void *ud) |
| LUA_API void | lua_close (lua_State *L) |
| #define fromstate | ( | l | ) | (cast(lu_byte *, (l)) - LUAI_EXTRASPACE) |
| #define lstate_c |
Definition at line 10 of file lstate.cpp.
| #define LUA_CORE |
Definition at line 11 of file lstate.cpp.
Definition at line 27 of file lstate.cpp.
Referenced by close_state(), lua_newstate(), luaE_freethread(), and luaE_newthread().
| static void callallgcTM | ( | lua_State * | L, | |
| void * | ud | |||
| ) | [static] |
Definition at line 193 of file lstate.cpp.
References luaC_callGCTM(), and UNUSED.
Referenced by lua_close().
| static void close_state | ( | lua_State * | L | ) | [static] |
Definition at line 105 of file lstate.cpp.
References global_State::buff, global_State::frealloc, freestack(), fromstate, G, lua_assert, luaC_freeall(), luaF_close(), luaM_freearray, luaZ_freebuffer, stringtable::nuse, obj2gco, global_State::rootgc, lua_State::stack, state_size, global_State::strt, global_State::totalbytes, and global_State::ud.
Referenced by lua_close(), and lua_newstate().
| static void f_luaopen | ( | lua_State * | L, | |
| void * | ud | |||
| ) | [static] |
Definition at line 70 of file lstate.cpp.
References G, global_State::GCthreshold, gt, luaH_new(), luaS_fix, luaS_newliteral, luaS_resize(), luaT_init(), luaX_init(), MEMERRMSG, MINSTRTABSIZE, registry, sethvalue, stack_init(), global_State::totalbytes, and UNUSED.
Referenced by lua_newstate().
Definition at line 61 of file lstate.cpp.
References lua_State::base_ci, luaM_freearray, lua_State::size_ci, lua_State::stack, and lua_State::stacksize.
Referenced by close_state(), and luaE_freethread().
| LUA_API void lua_close | ( | lua_State * | L | ) |
| static void preinit_state | ( | lua_State * | L, | |
| global_State * | g | |||
| ) | [static] |
Definition at line 84 of file lstate.cpp.
References lua_State::allowhook, lua_State::base_ci, lua_State::basehookcount, lua_State::ci, lua_State::errfunc, lua_State::errorJmp, G, gt, lua_State::hook, lua_State::hookmask, lua_State::nCcalls, NULL, lua_State::openupval, resethookcount, lua_State::savedpc, setnilvalue, lua_State::size_ci, lua_State::stack, lua_State::stacksize, and lua_State::status.
Referenced by lua_newstate(), and luaE_newthread().
Definition at line 42 of file lstate.cpp.
References CallInfo::base, lua_State::base, lua_State::base_ci, BASIC_CI_SIZE, BASIC_STACK_SIZE, lua_State::ci, lua_State::end_ci, EXTRA_STACK, CallInfo::func, LUA_MINSTACK, luaM_newvector, setnilvalue, lua_State::size_ci, lua_State::stack, lua_State::stack_last, lua_State::stacksize, CallInfo::top, and lua_State::top.
Referenced by f_luaopen(), and luaE_newthread().
1.5.3