27 for (i=1; i<=n; i++) {
36 LUA_QL(
"tostring")
" must return a string to " LUA_QL(
"print"));
37 if (i>1) luai_writestring(
"\t", 1);
38 luai_writestring(
s, l);
46#define SPACECHARS " \f\n\r\t\v"
61 const char *e =
s + l;
64 luaL_argcheck(L, 2 <= base && base <= 36, 2,
"base out of range");
66 if (*
s ==
'-') {
s++; neg = 1; }
67 else if (*
s ==
'+')
s++;
68 if (isalnum((
unsigned char)*
s)) {
71 int digit = (isdigit((
unsigned char)*
s)) ? *
s -
'0'
72 : toupper((
unsigned char)*
s) -
'A' + 10;
73 if (
digit >= base)
break;
76 }
while (isalnum((
unsigned char)*
s));
116 "nil or table expected");
118 return luaL_error(L,
"cannot change a protected metatable");
136 "table or string expected");
161 static const char *
const opts[] = {
"stop",
"restart",
"collect",
162 "count",
"step",
"setpause",
"setstepmul",
163 "setmajorinc",
"isrunning",
"generational",
"incremental",
NULL};
169 int res =
lua_gc(L, o, ex);
283#define RESERVEDSLOT 5
303 luaL_error(L,
"reader function must return a string");
361 if (i < 0) i = n + i;
362 else if (i > n) i = n;
426#if defined(LUA_COMPAT_LOADSTRING)
#define lua_rawlen(L, index)
LUA_API void lua_pushstring(lua_State *L, const char *s)
LUA_API int lua_setmetatable(lua_State *L, int objindex)
LUA_API void lua_pushnil(lua_State *L)
LUA_API void lua_concat(lua_State *L, int n)
LUA_API void lua_pushnumber(lua_State *L, lua_Number n)
LUA_API void lua_setfield(lua_State *L, int idx, const char *k)
LUA_API void lua_rawget(lua_State *L, int idx)
LUA_API int lua_toboolean(lua_State *L, int idx)
LUA_API int lua_getmetatable(lua_State *L, int objindex)
LUA_API void lua_pushboolean(lua_State *L, int b)
LUA_API const char * lua_tolstring(lua_State *L, int idx, size_t *len)
LUA_API void lua_pushvalue(lua_State *L, int idx)
LUA_API int lua_type(lua_State *L, int idx)
LUA_API int lua_error(lua_State *L)
LUA_API int lua_load(lua_State *L, lua_Reader reader, void *data, const char *chunkname)
LUA_API int lua_isstring(lua_State *L, int idx)
LUA_API int lua_next(lua_State *L, int idx)
LUA_API int lua_rawequal(lua_State *L, int index1, int index2)
LUA_API int lua_checkstack(lua_State *L, int size)
LUA_API const char * lua_setupvalue(lua_State *L, int funcindex, int n)
LUA_API void lua_settop(lua_State *L, int idx)
LUA_API void lua_pushinteger(lua_State *L, lua_Integer n)
LUA_API void lua_rawgeti(lua_State *L, int idx, int n)
LUA_API int lua_gc(lua_State *L, int what, int data)
LUA_API void lua_rawset(lua_State *L, int idx)
LUA_API int lua_gettop(lua_State *L)
LUALIB_API void luaL_where(lua_State *L, int level)
LUALIB_API void luaL_checkstack(lua_State *L, int space, const char *mes)
LUALIB_API void luaL_checktype(lua_State *L, int narg, int t)
LUALIB_API int luaL_error(lua_State *L, const char *fmt,...)
LUALIB_API void luaL_checkany(lua_State *L, int narg)
LUALIB_API const char * luaL_checklstring(lua_State *L, int narg, size_t *len)
LUALIB_API int luaL_checkoption(lua_State *L, int narg, const char *def, const char *const lst[])
LUALIB_API int luaL_getmetafield(lua_State *L, int obj, const char *event)
#define luaL_typename(L, i)
#define luaL_optstring(L, n, d)
#define luaL_optint(L, n, d)
#define luaL_checkint(L, n)
#define luaL_argcheck(L, cond, numarg, extramsg)
#define lua_pushcfunction(L, f)
#define lua_pushliteral(L, s)
int(* lua_CFunction)(lua_State *L)
#define lua_getglobal(L, s)
#define lua_tostring(L, i)
#define lua_isnoneornil(L, n)
LUA_API void lua_callk(lua_State *L, int nargs, int nresults, int ctx, lua_CFunction k)
LUA_API void lua_copy(lua_State *L, int fromidx, int toidx)
LUA_API int lua_pcallk(lua_State *L, int nargs, int nresults, int errfunc, int ctx, lua_CFunction k)
LUA_API int lua_getctx(lua_State *L, int *ctx)
LUA_API lua_Number lua_tonumberx(lua_State *L, int idx, int *isnum)
LUALIB_API void luaL_setfuncs(lua_State *L, const luaL_Reg *l, int nup)
LUALIB_API const char * luaL_tolstring(lua_State *L, int idx, size_t *len)
LUALIB_API int luaL_loadfilex(lua_State *L, const char *filename, const char *mode)
LUALIB_API int luaL_loadbufferx(lua_State *L, const char *buff, size_t size, const char *name, const char *mode)
#define luaL_loadfile(L, f)
static int luaB_collectgarbage(lua_State *L)
static const luaL_Reg base_funcs[]
static int luaB_tostring(lua_State *L)
static int finishpcall(lua_State *L, int status)
static int luaB_pcall(lua_State *L)
static int luaB_rawget(lua_State *L)
static int dofilecont(lua_State *L)
static int luaB_error(lua_State *L)
static int load_aux(lua_State *L, int status, int envidx)
static int luaB_pairs(lua_State *L)
static int luaB_load(lua_State *L)
static int luaB_rawequal(lua_State *L)
static int pcallcont(lua_State *L)
static int luaB_ipairs(lua_State *L)
static int luaB_xpcall(lua_State *L)
static int luaB_tonumber(lua_State *L)
static int luaB_rawlen(lua_State *L)
static int luaB_type(lua_State *L)
static int luaB_rawset(lua_State *L)
static int luaB_print(lua_State *L)
static int luaB_dofile(lua_State *L)
static int luaB_assert(lua_State *L)
static int pairsmeta(lua_State *L, const char *method, int iszero, lua_CFunction iter)
static const char * generic_reader(lua_State *L, void *ud, size_t *size)
static int ipairsaux(lua_State *L)
static int luaB_next(lua_State *L)
static int luaB_select(lua_State *L)
static int luaB_getmetatable(lua_State *L)
LUAMOD_API int luaopen_base(lua_State *L)
static int luaB_loadfile(lua_State *L)
static int luaB_setmetatable(lua_State *L)
#define LUA_GCSETMAJORINC
#define lua_call(L, n, r)
#define lua_pushglobaltable(L)
#define lua_replace(L, idx)
#define lua_insert(L, idx)
CURL_EXTERN CURLMcode curl_socket_t s