Github User Fetcher 1.0.0
C Application with Server and GUI
|
#include "lprefix.h"
#include <limits.h>
#include <stddef.h>
#include <string.h>
#include "lua.h"
#include "lauxlib.h"
#include "lualib.h"
#include <time.h>
Go to the source code of this file.
Macros | |
#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 |
Typedefs | |
typedef unsigned int | IdxT |
Functions | |
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 | pack (lua_State *L) |
static int | unpack (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) |
Variables | |
static const luaL_Reg | tab_funcs [] |
#define ltablib_c |
Definition at line 7 of file lua-5.3.6/src/ltablib.c.
#define LUA_LIB |
Definition at line 8 of file lua-5.3.6/src/ltablib.c.
#define RANLIMIT 100u |
Definition at line 274 of file lua-5.3.6/src/ltablib.c.
Referenced by auxsort().
#define sof | ( | e | ) | (sizeof(e) / sizeof(unsigned int)) |
Definition at line 250 of file lua-5.3.6/src/ltablib.c.
Referenced by l_randomizePivot().
#define TAB_L 4 /* length */ |
Definition at line 29 of file lua-5.3.6/src/ltablib.c.
Referenced by checktab().
#define TAB_R 1 /* read */ |
Definition at line 27 of file lua-5.3.6/src/ltablib.c.
Referenced by checktab(), tconcat(), and tmove().
Definition at line 30 of file lua-5.3.6/src/ltablib.c.
#define TAB_W 2 /* write */ |
Definition at line 28 of file lua-5.3.6/src/ltablib.c.
Referenced by checktab(), and tmove().
typedef unsigned int IdxT |
Definition at line 236 of file lua-5.3.6/src/ltablib.c.
|
static |
Definition at line 160 of file lua-5.3.6/src/ltablib.c.
References lua_geti(), lua_isstring(), luaL_addvalue(), luaL_error(), and luaL_typename.
Referenced by tconcat().
Definition at line 357 of file lua-5.3.6/src/ltablib.c.
References auxsort(), choosePivot(), l_randomizePivot(), lua_geti(), lua_pop, lua_pushvalue(), partition(), RANLIMIT, set2(), and sort_comp().
|
static |
Definition at line 36 of file lua-5.3.6/src/ltablib.c.
References lua_pushstring(), lua_rawget(), and LUA_TNIL.
Referenced by checktab().
|
static |
Definition at line 46 of file lua-5.3.6/src/ltablib.c.
References arg, checkfield(), lua_getmetatable(), lua_pop, LUA_TTABLE, lua_type(), luaL_checktype(), TAB_L, TAB_R, and TAB_W.
Referenced by tmove().
Definition at line 346 of file lua-5.3.6/src/ltablib.c.
References lua_assert.
Referenced by auxsort().
|
static |
Definition at line 258 of file lua-5.3.6/src/ltablib.c.
Referenced by auxsort().
LUAMOD_API int luaopen_table | ( | lua_State * | L | ) |
Definition at line 441 of file lua-5.3.6/src/ltablib.c.
References lua_getfield(), lua_setglobal, luaL_newlib, and tab_funcs.
|
static |
Definition at line 194 of file lua-5.3.6/src/ltablib.c.
References lua_createtable(), lua_gettop(), lua_insert, lua_pushinteger(), lua_setfield(), and lua_seti().
Definition at line 310 of file lua-5.3.6/src/ltablib.c.
References lua_geti(), lua_pop, luaL_error(), set2(), and sort_comp().
Referenced by auxsort().
Definition at line 277 of file lua-5.3.6/src/ltablib.c.
References lua_seti().
Referenced by auxsort(), and partition().
|
static |
Definition at line 411 of file lua-5.3.6/src/ltablib.c.
References aux_getn, auxsort(), lua_isnoneornil, lua_settop(), LUA_TFUNCTION, luaL_argcheck, luaL_checktype(), and TAB_RW.
|
static |
Definition at line 287 of file lua-5.3.6/src/ltablib.c.
References lua_call, lua_compare(), lua_isnil, LUA_OPLT, lua_pop, lua_pushvalue(), and lua_toboolean().
Referenced by auxsort(), and partition().
|
static |
Definition at line 169 of file lua-5.3.6/src/ltablib.c.
References addfield(), aux_getn, luaL_addlstring(), luaL_buffinit(), luaL_optinteger(), luaL_optlstring(), luaL_pushresult(), and TAB_R.
|
static |
Definition at line 79 of file lua-5.3.6/src/ltablib.c.
References aux_getn, lua_geti(), lua_gettop(), lua_seti(), luaL_argcheck, luaL_checkinteger(), luaL_error(), and TAB_RW.
|
static |
Definition at line 128 of file lua-5.3.6/src/ltablib.c.
References checktab(), lua_compare(), lua_geti(), lua_isnoneornil, LUA_OPEQ, lua_pushvalue(), lua_seti(), luaL_argcheck, luaL_checkinteger(), TAB_R, and TAB_W.
|
static |
Definition at line 106 of file lua-5.3.6/src/ltablib.c.
References aux_getn, lua_geti(), lua_pushnil(), lua_seti(), luaL_argcheck, luaL_optinteger(), and TAB_RW.
|
static |
Definition at line 207 of file lua-5.3.6/src/ltablib.c.
References lua_checkstack(), lua_geti(), luaL_checkinteger(), luaL_error(), luaL_len(), luaL_opt, and luaL_optinteger().
|
static |
Definition at line 426 of file lua-5.3.6/src/ltablib.c.
Referenced by luaopen_table().