lua5.4
宏定义 | 类型定义 | 函数 | 变量
ltablib.c 文件参考
#include "lprefix.h"
#include <limits.h>
#include <stddef.h>
#include <string.h>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#include <time.h>
ltablib.c 的引用(Include)关系图:
此图展示该文件直接或间接的被哪些文件引用了:

宏定义

#define ltablib_c
 
#define LUA_LIB
 
#define TAB_R   1 /* read */
 
#define TAB_W   2 /* write */
 
#define TAB_L   4 /* length */
 
#define TAB_RW   (TAB_R | TAB_W) /* read/write */
 
#define aux_getn(L, n, w)   (checktab(L, n, (w) | TAB_L), luaL_len(L, n))
 
#define sof(e)   (sizeof(e) / sizeof(unsigned int))
 
#define RANLIMIT   100u
 

类型定义

typedef unsigned int IdxT
 

函数

static int checkfield (lua_State *L, const char *key, int n)
 
static void checktab (lua_State *L, int arg, int what)
 
static int tinsert (lua_State *L)
 
static int tremove (lua_State *L)
 
static int tmove (lua_State *L)
 
static void addfield (lua_State *L, luaL_Buffer *b, lua_Integer i)
 
static int tconcat (lua_State *L)
 
static int tpack (lua_State *L)
 
static int tunpack (lua_State *L)
 
static unsigned int l_randomizePivot (void)
 
static void set2 (lua_State *L, IdxT i, IdxT j)
 
static int sort_comp (lua_State *L, int a, int b)
 
static IdxT partition (lua_State *L, IdxT lo, IdxT up)
 
static IdxT choosePivot (IdxT lo, IdxT up, unsigned int rnd)
 
static void auxsort (lua_State *L, IdxT lo, IdxT up, unsigned int rnd)
 
static int sort (lua_State *L)
 
LUAMOD_API int luaopen_table (lua_State *L)
 

变量

static const luaL_Reg tab_funcs []
 

宏定义说明

◆ aux_getn

#define aux_getn (   L,
  n,
 
)    (checktab(L, n, (w) | TAB_L), luaL_len(L, n))

◆ ltablib_c

#define ltablib_c

◆ LUA_LIB

#define LUA_LIB

◆ RANLIMIT

#define RANLIMIT   100u

◆ sof

#define sof (   e)    (sizeof(e) / sizeof(unsigned int))

◆ TAB_L

#define TAB_L   4 /* length */

◆ TAB_R

#define TAB_R   1 /* read */

◆ TAB_RW

#define TAB_RW   (TAB_R | TAB_W) /* read/write */

◆ TAB_W

#define TAB_W   2 /* write */

类型定义说明

◆ IdxT

typedef unsigned int IdxT

函数说明

◆ addfield()

static void addfield ( lua_State L,
luaL_Buffer b,
lua_Integer  i 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ auxsort()

static void auxsort ( lua_State L,
IdxT  lo,
IdxT  up,
unsigned int  rnd 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ checkfield()

static int checkfield ( lua_State L,
const char *  key,
int  n 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ checktab()

static void checktab ( lua_State L,
int  arg,
int  what 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ choosePivot()

static IdxT choosePivot ( IdxT  lo,
IdxT  up,
unsigned int  rnd 
)
static
这是这个函数的调用关系图:

◆ l_randomizePivot()

static unsigned int l_randomizePivot ( void  )
static
这是这个函数的调用关系图:

◆ luaopen_table()

LUAMOD_API int luaopen_table ( lua_State L)

◆ partition()

static IdxT partition ( lua_State L,
IdxT  lo,
IdxT  up 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ set2()

static void set2 ( lua_State L,
IdxT  i,
IdxT  j 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ sort()

static int sort ( lua_State L)
static
函数调用图:

◆ sort_comp()

static int sort_comp ( lua_State L,
int  a,
int  b 
)
static
函数调用图:
这是这个函数的调用关系图:

◆ tconcat()

static int tconcat ( lua_State L)
static
函数调用图:

◆ tinsert()

static int tinsert ( lua_State L)
static
函数调用图:

◆ tmove()

static int tmove ( lua_State L)
static
函数调用图:

◆ tpack()

static int tpack ( lua_State L)
static
函数调用图:

◆ tremove()

static int tremove ( lua_State L)
static
函数调用图:

◆ tunpack()

static int tunpack ( lua_State L)
static
函数调用图:

变量说明

◆ tab_funcs

const luaL_Reg tab_funcs[]
static
初始值:
= {
{"concat", tconcat},
{"insert", tinsert},
{"pack", tpack},
{"unpack", tunpack},
{"remove", tremove},
{"move", tmove},
{"sort", sort},
{NULL, NULL}
}
tmove
static int tmove(lua_State *L)
Definition: ltablib.c:114
tpack
static int tpack(lua_State *L)
Definition: ltablib.c:180
tremove
static int tremove(lua_State *L)
Definition: ltablib.c:90
tconcat
static int tconcat(lua_State *L)
Definition: ltablib.c:155
tinsert
static int tinsert(lua_State *L)
Definition: ltablib.c:61
sort
static int sort(lua_State *L)
Definition: ltablib.c:397
tunpack
static int tunpack(lua_State *L)
Definition: ltablib.c:193