lua5.4
| 宏定义 | 类型定义 | 函数 | 变量
ltests.h 文件参考
#include <stdio.h>
#include <stdlib.h>
ltests.h 的引用(Include)关系图:

浏览源代码.

struct  Memcontrol
 
struct  L_EXTRA
 

宏定义

#define LUA_COMPAT_MATHLIB
 
#define LUA_COMPAT_LT_LE
 
#define LUA_DEBUG
 
#define LUAI_ASSERT
 
#define UNUSED(x)   (x=0, (void)(x))
 
#define l_sprintf(s, sz, f, i)   (memset(s,0xAB,sz), snprintf(s,sz,f,i))
 
#define LUA_USE_JUMPTABLE   0
 
#define LUA_RAND32
 
#define LUA_EXTRASPACE   sizeof(struct L_EXTRA)
 
#define getlock(l)   cast(struct L_EXTRA*, lua_getextraspace(l))
 
#define luai_userstateopen(l)   (getlock(l)->lock = 0, getlock(l)->plock = &(getlock(l)->lock))
 
#define luai_userstateclose(l)   lua_assert(getlock(l)->lock == 1 && getlock(l)->plock == &(getlock(l)->lock))
 
#define luai_userstatethread(l, l1)   lua_assert(getlock(l1)->plock == getlock(l)->plock)
 
#define luai_userstatefree(l, l1)   lua_assert(getlock(l)->plock == getlock(l1)->plock)
 
#define lua_lock(l)   lua_assert((*getlock(l)->plock)++ == 0)
 
#define lua_unlock(l)   lua_assert(--(*getlock(l)->plock) == 0)
 
#define LUAL_BUFFERSIZE   23
 
#define MINSTRTABSIZE   2
 
#define MAXIWTHABS   3
 
#define STRCACHE_N   23
 
#define STRCACHE_M   5
 
#define LUAI_USER_ALIGNMENT_T   union { char b[sizeof(void*) * 8]; }
 
#define LUAI_MAXSTACK   50000
 
#define LUAI_MAXCCALLS   180
 

类型定义

typedef struct Memcontrol Memcontrol
 

函数

LUAI_FUNC int lua_checkmemory (lua_State *L)
 
LUAI_FUNC void lua_printobj (lua_State *L, struct GCObject *o)
 
LUA_API int luaB_opentests (lua_State *L)
 
LUA_API void * debug_realloc (void *ud, void *block, size_t osize, size_t nsize)
 

变量

LUA_API Memcontrol l_memcontrol
 
void * l_Trick
 

宏定义说明

◆ getlock

#define getlock (   l)    cast(struct L_EXTRA*, lua_getextraspace(l))

◆ l_sprintf

#define l_sprintf (   s,
  sz,
  f,
 
)    (memset(s,0xAB,sz), snprintf(s,sz,f,i))

◆ LUA_COMPAT_LT_LE

#define LUA_COMPAT_LT_LE

◆ LUA_COMPAT_MATHLIB

#define LUA_COMPAT_MATHLIB

◆ LUA_DEBUG

#define LUA_DEBUG

◆ LUA_EXTRASPACE

#define LUA_EXTRASPACE   sizeof(struct L_EXTRA)

◆ lua_lock

#define lua_lock (   l)    lua_assert((*getlock(l)->plock)++ == 0)

◆ LUA_RAND32

#define LUA_RAND32

◆ lua_unlock

#define lua_unlock (   l)    lua_assert(--(*getlock(l)->plock) == 0)

◆ LUA_USE_JUMPTABLE

#define LUA_USE_JUMPTABLE   0

◆ LUAI_ASSERT

#define LUAI_ASSERT

◆ LUAI_MAXCCALLS

#define LUAI_MAXCCALLS   180

◆ LUAI_MAXSTACK

#define LUAI_MAXSTACK   50000

◆ LUAI_USER_ALIGNMENT_T

#define LUAI_USER_ALIGNMENT_T   union { char b[sizeof(void*) * 8]; }

◆ luai_userstateclose

#define luai_userstateclose (   l)    lua_assert(getlock(l)->lock == 1 && getlock(l)->plock == &(getlock(l)->lock))

◆ luai_userstatefree

#define luai_userstatefree (   l,
  l1 
)    lua_assert(getlock(l)->plock == getlock(l1)->plock)

◆ luai_userstateopen

#define luai_userstateopen (   l)    (getlock(l)->lock = 0, getlock(l)->plock = &(getlock(l)->lock))

◆ luai_userstatethread

#define luai_userstatethread (   l,
  l1 
)    lua_assert(getlock(l1)->plock == getlock(l)->plock)

◆ LUAL_BUFFERSIZE

#define LUAL_BUFFERSIZE   23

◆ MAXIWTHABS

#define MAXIWTHABS   3

◆ MINSTRTABSIZE

#define MINSTRTABSIZE   2

◆ STRCACHE_M

#define STRCACHE_M   5

◆ STRCACHE_N

#define STRCACHE_N   23

◆ UNUSED

#define UNUSED (   x)    (x=0, (void)(x))

类型定义说明

◆ Memcontrol

typedef struct Memcontrol Memcontrol

函数说明

◆ debug_realloc()

LUA_API void* debug_realloc ( void *  ud,
void *  block,
size_t  osize,
size_t  nsize 
)

◆ lua_checkmemory()

LUAI_FUNC int lua_checkmemory ( lua_State L)

◆ lua_printobj()

LUAI_FUNC void lua_printobj ( lua_State L,
struct GCObject o 
)

◆ luaB_opentests()

LUA_API int luaB_opentests ( lua_State L)

变量说明

◆ l_memcontrol

LUA_API Memcontrol l_memcontrol

◆ l_Trick

void* l_Trick