15 #define LUA_COMPAT_MATHLIB 16 #define LUA_COMPAT_LT_LE 29 #define LUAI_MAXCSTACK 400 32 #define UNUSED(x) (x=0, (void)(x)) 37 #if !defined(LUA_USE_C89) 38 #define l_sprintf(s,sz,f,i) (memset(s,0xAB,sz), snprintf(s,sz,f,i)) 40 #define l_sprintf(s,sz,f,i) (memset(s,0xAB,sz), sprintf(s,f,i)) 45 #define LUA_USE_JUMPTABLE 0 89 #define LUA_EXTRASPACE sizeof(struct L_EXTRA) 90 #define getlock(l) cast(struct L_EXTRA*, lua_getextraspace(l)) 91 #define luai_userstateopen(l) \ 92 (getlock(l)->lock = 0, getlock(l)->plock = &(getlock(l)->lock)) 93 #define luai_userstateclose(l) \ 94 lua_assert(getlock(l)->lock == 1 && getlock(l)->plock == &(getlock(l)->lock)) 95 #define luai_userstatethread(l,l1) \ 96 lua_assert(getlock(l1)->plock == getlock(l)->plock) 97 #define luai_userstatefree(l,l1) \ 98 lua_assert(getlock(l)->plock == getlock(l1)->plock) 99 #define lua_lock(l) lua_assert((*getlock(l)->plock)++ == 0) 100 #define lua_unlock(l) lua_assert(--(*getlock(l)->plock) == 0) 107 size_t osize,
size_t nsize);
110 #define luaL_newstate() lua_newstate(debug_realloc, &l_memcontrol) 111 #define luaL_openlibs(L) \ 112 { (luaL_openlibs)(L); \ 113 luaL_requiref(L, "T", luaB_opentests, 1); \ 121 #undef LUAL_BUFFERSIZE 122 #define LUAL_BUFFERSIZE 23 123 #define MINSTRTABSIZE 2 126 #define STRCACHE_N 23 129 #undef LUAI_USER_ALIGNMENT_T 130 #define LUAI_USER_ALIGNMENT_T union { char b[sizeof(void*) * 8]; } 135 #define LUAI_MAXSTACK 50000 139 #undef lua_strx2number 140 #undef lua_number2strx
LUAI_FUNC int lua_checkmemory(lua_State *L)
LUAI_FUNC void lua_printobj(lua_State *L, struct GCObject *o)
LUA_API void * debug_realloc(void *ud, void *block, size_t osize, size_t nsize)
static void block(LexState *ls)
LUA_API int luaB_opentests(lua_State *L)
struct Memcontrol Memcontrol
unsigned long objcount[LUA_NUMTYPES]
LUA_API Memcontrol l_memcontrol