28 #if !defined(LUAI_GCPAUSE)
29 #define LUAI_GCPAUSE 200
32 #if !defined(LUAI_GCMAJOR)
33 #define LUAI_GCMAJOR 200
36 #if !defined(LUAI_GCMUL)
37 #define LUAI_GCMUL 200
41 #define MEMERRMSG "not enough memory"
48 #if !defined(luai_makeseed)
50 #define luai_makeseed() cast(unsigned int, time(NULL))
59 #if defined(LUAI_EXTRASPACE)
76 #define fromstate(L) (cast(LX *, cast(lu_byte *, (L)) - offsetof(LX, l)))
84 #define addbuff(b,p,e) \
85 { size_t t = cast(size_t, e); \
86 memcpy(buff + p, &t, sizeof(t)); p += sizeof(t); }
89 char buff[4 *
sizeof(size_t)];
125 while ((ci = next) != NULL) {
153 if (L->
stack == NULL)
270 if (l == NULL)
return NULL;
317 L =
G(L)->mainthread;
#define luaZ_freebuffer(L, buff)
void luaE_setdebt(global_State *g, l_mem debt)
void luaE_freethread(lua_State *L, lua_State *L1)
static unsigned int makeseed(lua_State *L)
#define luaZ_initbuffer(L, buff)
#define luai_userstateclose(L)
#define luai_userstatefree(L, L1)
void luaF_close(lua_State *L, StkId level)
#define luaM_newvector(L, n, t)
unsigned int luaS_hash(const char *str, size_t l, unsigned int seed)
void luaH_resize(lua_State *L, Table *t, int nasize, int nhsize)
#define luaM_freearray(L, b, n)
void *(* lua_Alloc)(void *ud, void *ptr, size_t osize, size_t nsize)
LUA_API const lua_Number * lua_version(lua_State *L)
GCObject * luaC_newobj(lua_State *L, int tt, size_t sz, GCObject **list, int offset)
void luaC_freeallobjects(lua_State *L)
void luaE_freeCI(lua_State *L)
static void stack_init(lua_State *L1, lua_State *L)
static void close_state(lua_State *L)
const lua_Number * version
static void f_luaopen(lua_State *L, void *ud)
#define LUA_RIDX_MAINTHREAD
#define luaS_newliteral(L, s)
#define sethvalue(L, obj, x)
struct lua_State * mainthread
#define luai_userstateopen(L)
void luaT_init(lua_State *L)
LUA_API void lua_close(lua_State *L)
void luaX_init(lua_State *L)
struct Table * mt[LUA_NUMTAGS]
#define resethookcount(L)
static void init_registry(lua_State *L, global_State *g)
Table * luaH_new(lua_State *L)
static void freestack(lua_State *L)
GLfloat GLfloat GLfloat GLfloat h
void luaH_setint(lua_State *L, Table *t, int key, TValue *value)
LUA_API lua_State * lua_newstate(lua_Alloc f, void *ud)
int luaD_rawrunprotected(lua_State *L, Pfunc f, void *ud)
char buff[LUAI_EXTRASPACE]
struct CallInfo * previous
void luaS_resize(lua_State *L, int newsize)
#define luai_userstatethread(L, L1)
#define setthvalue(L, obj, x)
static void preinit_state(lua_State *L, global_State *g)
LUA_API lua_State * lua_newthread(lua_State *L)
struct lua_longjmp * errorJmp
CallInfo * luaE_extendCI(lua_State *L)