#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.
|
typedef unsigned int | IdxT |
|
|
static void | addfield (lua_State *L, luaL_Buffer *b, lua_Integer i) |
|
static void | auxsort (lua_State *L, IdxT lo, IdxT up, unsigned int rnd) |
|
static int | checkfield (lua_State *L, const char *key, int n) |
|
static void | checktab (lua_State *L, int arg, int what) |
|
static IdxT | choosePivot (IdxT lo, IdxT up, unsigned int rnd) |
|
static unsigned int | l_randomizePivot (void) |
|
LUAMOD_API int | luaopen_table (lua_State *L) |
|
static IdxT | partition (lua_State *L, IdxT lo, IdxT up) |
|
static void | set2 (lua_State *L, IdxT i, IdxT j) |
|
static int | sort (lua_State *L) |
|
static int | sort_comp (lua_State *L, int a, int b) |
|
static int | tconcat (lua_State *L) |
|
static int | tinsert (lua_State *L) |
|
static int | tmove (lua_State *L) |
|
static int | tpack (lua_State *L) |
|
static int | tremove (lua_State *L) |
|
static int | tunpack (lua_State *L) |
|
◆ aux_getn
◆ ltablib_c
◆ LUA_LIB
◆ RANLIMIT
◆ 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
◆ TAB_W
#define TAB_W 2 /* write */ |
◆ IdxT
typedef unsigned int IdxT |
◆ addfield()
◆ auxsort()
◆ 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()
◆ partition()
◆ set2()
◆ sort()
◆ sort_comp()
static int sort_comp |
( |
lua_State * |
L, |
|
|
int |
a, |
|
|
int |
b |
|
) |
| |
|
static |
◆ tconcat()
◆ tinsert()
◆ tmove()
◆ tpack()
◆ tremove()
◆ tunpack()
◆ tab_funcs