18 #define aux_getn(L,n) (luaL_checktype(L, n, LUA_TTABLE), luaL_len(L, n))
22 #if defined(LUA_COMPAT_MAXN)
51 luaL_argcheck(L, 1 <= pos && pos <= e, 2,
"position out of bounds");
52 for (i = e; i >
pos; i--) {
71 luaL_argcheck(L, 1 <= pos && pos <= size + 1, 1,
"position out of bounds");
73 for ( ; pos <
size; pos++) {
86 luaL_error(L,
"invalid value (%s) at index %d in table for "
101 for (; i < last; i++) {
128 for (i = n; i >= 2; i--)
143 return luaL_error(L,
"too many results to unpack");
217 if (i>=u)
luaL_error(L,
"invalid order function for sorting");
222 if (j<=l)
luaL_error(L,
"invalid order function for sorting");
261 #if defined(LUA_COMPAT_MAXN)
275 #if defined(LUA_COMPAT_UNPACK)
LUA_API void lua_rawgeti(lua_State *L, int idx, int n)
#define lua_isnoneornil(L, n)
LUALIB_API void luaL_addvalue(luaL_Buffer *B)
static void set2(lua_State *L, int i, int j)
LUA_API void lua_createtable(lua_State *L, int narray, int nrec)
LUA_API void lua_getfield(lua_State *L, int idx, const char *k)
LUA_API void lua_replace(lua_State *L, int idx)
LUA_API void lua_settop(lua_State *L, int idx)
LUA_API int lua_type(lua_State *L, int idx)
static void auxsort(lua_State *L, int l, int u)
LUALIB_API const char * luaL_optlstring(lua_State *L, int narg, const char *def, size_t *len)
LUALIB_API void luaL_checktype(lua_State *L, int narg, int t)
LUALIB_API void luaL_pushresult(luaL_Buffer *B)
LUA_API int lua_gettop(lua_State *L)
#define lua_tonumber(L, i)
#define luaL_typename(L, i)
LUALIB_API void luaL_checkstack(lua_State *L, int space, const char *msg)
#define luaL_argcheck(L, cond, numarg, extramsg)
static int pack(lua_State *L)
static void addfield(lua_State *L, luaL_Buffer *b, int i)
GLdouble GLdouble GLdouble b
LUA_API int lua_compare(lua_State *L, int index1, int index2, int op)
LUA_API void lua_setglobal(lua_State *L, const char *var)
LUA_API int lua_isstring(lua_State *L, int idx)
static int unpack(lua_State *L)
#define luaL_opt(L, f, n, d)
LUAMOD_API int luaopen_table(lua_State *L)
LUA_API int lua_toboolean(lua_State *L, int idx)
LUALIB_API void luaL_buffinit(lua_State *L, luaL_Buffer *B)
GLboolean GLboolean GLboolean GLboolean a
static int tinsert(lua_State *L)
static int sort_comp(lua_State *L, int a, int b)
LUALIB_API void luaL_addlstring(luaL_Buffer *B, const char *s, size_t l)
LUA_API void lua_pushnil(lua_State *L)
LUA_API void lua_pushnumber(lua_State *L, lua_Number n)
static int tconcat(lua_State *L)
static int tremove(lua_State *L)
LUA_API void lua_rawseti(lua_State *L, int idx, int n)
LUA_API void lua_pushvalue(lua_State *L, int idx)
static int sort(lua_State *L)
#define luaL_newlib(L, l)
#define lua_call(L, n, r)
LUALIB_API int luaL_error(lua_State *L, const char *fmt,...)
static const luaL_Reg tab_funcs[]
static int maxn(lua_State *L)
#define luaL_checkint(L, n)
#define luaL_optint(L, n, d)
LUA_API int lua_checkstack(lua_State *L, int size)
LUALIB_API int luaL_len(lua_State *L, int idx)
LUA_API void lua_pushinteger(lua_State *L, lua_Integer n)
LUA_API void lua_setfield(lua_State *L, int idx, const char *k)
LUA_API int lua_next(lua_State *L, int idx)