41 #if defined(LUA_DEBUG) 47 #define obj_at(L,k) s2v(L->ci->func + (k)) 53 static void setnameval (
lua_State *L,
const char *
name,
int val) {
65 static void badexit (
const char *fmt,
const char *s1,
const char *s2) {
66 fprintf(stderr, fmt, s1);
68 fprintf(stderr,
"extra info: %s\n", s2);
77 if (msg == NULL) msg =
"error object is not a string";
78 return (badexit(
"PANIC: unprotected error in call to Lua API (%s)\n",
94 static void warnf (
void *ud,
const char *msg,
int tocont) {
96 static char buff[200] =
"";
99 static int lasttocont = 0;
100 if (!lasttocont && !tocont && *msg ==
'@') {
102 badexit(
"Control warning during warning: %s\naborting...\n", msg, buff);
103 if (strcmp(msg,
"@off") == 0)
105 else if (strcmp(msg,
"@on") == 0)
107 else if (strcmp(msg,
"@normal") == 0)
109 else if (strcmp(msg,
"@allow") == 0)
111 else if (strcmp(msg,
"@store") == 0)
114 badexit(
"Invalid control warning in test mode: %s\naborting...\n",
119 if (strlen(msg) >=
sizeof(buff) - strlen(buff))
120 badexit(
"warnf-buffer overflow (%s)\n", msg, buff);
128 badexit(
"Unhandled warning in store mode: %s\naborting...\n",
134 if (buff[0] !=
'#' && onoff)
135 badexit(
"Unexpected warning in test mode: %s\naborting...\n",
140 fprintf(stderr,
"Lua warning: %s\n", buff);
173 #if !defined(EXTERNMEMCHECK) 177 #define fillmem(mem,size) memset(mem, -MARK, size) 183 #define fillmem(mem,size) 189 {0, 0UL, 0UL, 0UL, 0UL, (~0UL),
190 {0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL, 0UL}};
195 size_t size = block->d.size;
197 for (i = 0; i < MARKSIZE; i++)
200 fillmem(block,
sizeof(
Header) + size + MARKSIZE);
208 void *
debug_realloc (
void *ud,
void *b,
size_t oldsize,
size_t size) {
213 char *limit = getenv(
"MEMLIMIT");
214 mc->
memlimit = limit ? strtoul(limit, NULL, 10) : ULONG_MAX;
222 type = block->d.
type;
226 freeblock(mc, block);
233 if (mc->
countlimit != ~0UL && size != oldsize) {
243 size_t commonsize = (oldsize < size) ? oldsize : size;
244 size_t realsize =
sizeof(
Header) + size + MARKSIZE;
245 if (realsize < size)
return NULL;
247 if (newblock == NULL)
250 memcpy(newblock + 1, block + 1, commonsize);
251 freeblock(mc, block);
254 fillmem(
cast_charp(newblock + 1) + commonsize, size - commonsize);
256 for (i = 0; i < MARKSIZE; i++)
257 *(
cast_charp(newblock + 1) + size + i) = MARK;
258 newblock->d.size = size;
291 if (
isdead(g,t))
return 0;
308 printf(
"||%s(%p)-%c%c(%02X)||",
311 "ns01oTt"[
getage(o)], o->marked);
322 int r1 = testobjref1(g, f, t);
333 #define checkobjref(g,f,t) \ 334 { if (t) lua_longassert(testobjref(g,f,obj2gco(t))); } 349 for (i = 0; i < asize; i++)
350 checkvalref(g, hgc, &h->
array[i]);
351 for (n =
gnode(h, 0); n < limit; n++) {
356 checkvalref(g, hgc, &k);
357 checkvalref(g, hgc,
gval(n));
367 for (i = 0; i < u->
nuvalue; i++)
368 checkvalref(g, hgc, &u->
uv[i].
uv);
379 checkobjref(g, fgc, f->
source);
380 for (i=0; i<f->
sizek; i++) {
382 checkobjref(g, fgc,
tsvalue(f->
k + i));
386 for (i=0; i<f->
sizep; i++)
387 checkobjref(g, fgc, f->
p[i]);
396 for (i = 0; i < cl->nupvalues; i++)
397 checkvalref(g, clgc, &cl->
upvalue[i]);
404 checkobjref(g, clgc, cl->
p);
405 for (i=0; i<cl->nupvalues; i++) {
408 checkobjref(g, clgc, uv);
416 static int lua_checkpc (
CallInfo *ci) {
417 if (!
isLua(ci))
return 1;
421 return p->
code <= ci->
u.
l.savedpc &&
432 if (L1->
stack == NULL) {
439 for (ci = L1->
ci; ci != NULL; ci = ci->
previous) {
451 checkudata(g,
gco2u(o));
455 checkvalref(g, o,
gco2upv(o)->v);
459 checktable(g,
gco2t(o));
475 checkproto(g,
gco2p(o));
539 o =
gco2u(o)->gclist;
554 total += checkgraylist(g, g->
gray);
556 total += checkgraylist(g, g->
weak);
557 total += checkgraylist(g, g->
allweak);
589 for (o = newl; o != survival; o = o->next) {
590 checkobject(g, o, maybedead,
G_NEW);
591 incifingray(g, o, &total);
594 for (o = survival; o != old; o = o->next) {
596 incifingray(g, o, &total);
599 for (o = old; o != reallyold; o = o->next) {
600 checkobject(g, o, 0,
G_OLD1);
601 incifingray(g, o, &total);
604 for (o = reallyold; o != NULL; o = o->next) {
605 checkobject(g, o, 0,
G_OLD);
606 incifingray(g, o, &total);
625 totalin = checkgrays(g);
628 for (o = g->
fixedgc; o != NULL; o = o->next) {
634 totalshould = checklist(g, maybedead, 0, g->
allgc,
638 totalshould += checklist(g, 0, 1, g->
finobj,
642 for (o = g->
tobefnz; o != NULL; o = o->next) {
643 checkobject(g, o, 0,
G_NEW);
644 incifingray(g, o, &totalshould);
664 static char *buildop (
Proto *p,
int pc,
char *buff) {
672 buff += sprintf(buff,
"(__");
674 buff += sprintf(buff,
"(%2d", lineinfo);
675 buff += sprintf(buff,
" - %4d) %4d - ", line, pc);
678 sprintf(buff,
"%-12s%4d %4d %4d%s", name,
689 sprintf(buff,
"%-12s%4d", name,
GETARG_Ax(i));
692 sprintf(buff,
"%-12s%4d", name,
GETARG_sJ(i));
700 void luaI_printcode (
Proto *pt,
int size) {
702 for (pc=0; pc<size; pc++) {
704 printf(
"%s\n", buildop(pt, pc, buff));
710 void luaI_printinst (
Proto *pt,
int pc) {
712 printf(
"%s\n", buildop(pt, pc, buff));
721 1,
"Lua function expected");
725 setnameval(L,
"numparams", p->
numparams);
740 1,
"Lua function expected");
746 printf(
"%s\n", buildop(p, pc, buff));
756 1,
"Lua function expected");
759 for (i=0; i<p->
sizek; i++) {
760 pushobject(L, p->
k+i);
767 static int listabslineinfo (
lua_State *L) {
771 1,
"Lua function expected");
791 1,
"Lua function expected");
805 printf(
"stack: >>\n");
806 for (i = 1; i <= n; i++) {
835 if (limit == 0) limit = ULONG_MAX;
862 static int alloc_failnext (
lua_State *L) {
888 isblack(obj) ?
"black" :
"gray");
901 static const char *gennames[] = {
"new",
"survival",
"old0",
"old1",
902 "old",
"touched1",
"touched2"};
915 printf(
"no collectable\n");
926 static const char *statenames[] = {
927 "propagate",
"atomic",
"enteratomic",
"sweepallgc",
"sweepfinobj",
928 "sweeptobefnz",
"sweepend",
"callfin",
"pause",
""};
929 static const int states[] = {
940 luaL_error(L,
"cannot change states in generational mode");
942 if (option < g->gcstate) {
994 else if ((
unsigned int)i < asize) {
996 pushobject(L, &t->
array[i]);
999 else if ((i -= asize) <
sizenode(t)) {
1019 static int string_query (
lua_State *L) {
1027 else if (s < tb->size) {
1030 for (ts = tb->
hash[s]; ts != NULL; ts = ts->
u.
hnext) {
1070 if (name == NULL)
return 0;
1086 while (size--) *p++ =
'\0';
1091 static int pushuserdata (
lua_State *L) {
1104 static int doonnewstack (
lua_State *L) {
1178 for (i = 0; libs[i].
name; i++) {
1223 struct Aux { jmp_buf jb;
const char *paniccode;
lua_State *
L; };
1234 runC(b->L, L, b->paniccode);
1255 if (setjmp(b.jb) == 0) {
1277 static void sethookaux (
lua_State *L,
int mask,
int count,
const char *code);
1279 static const char *
const delimits =
" \t\n,;";
1281 static void skip (
const char **pc) {
1283 if (**pc !=
'\0' && strchr(delimits, **pc)) (*pc)++;
1284 else if (**pc ==
'#') {
1285 while (**pc !=
'\n' && **pc !=
'\0') (*pc)++;
1301 else if (**pc ==
'*') {
1306 else if (**pc ==
'-') {
1316 static const char *getstring_aux (
lua_State *L,
char *buff,
const char **pc) {
1319 if (**pc ==
'"' || **pc ==
'\'') {
1320 int quote = *(*pc)++;
1321 while (**pc != quote) {
1322 if (**pc ==
'\0')
luaL_error(L,
"unfinished string in C script");
1323 buff[i++] = *(*pc)++;
1328 while (**pc !=
'\0' && !strchr(delimits, **pc))
1329 buff[i++] = *(*pc)++;
1340 case 'G':
return luaL_error(L,
"deprecated index 'G'");
1342 default: (*pc)--;
return getnum_aux(L, L1, pc);
1347 static const char *
const statcodes[] = {
"OK",
"YIELD",
"ERRRUN",
1348 "ERRSYNTAX",
MEMERRMSG,
"ERRGCMM",
"ERRERR"};
1356 for (i = 0; i <
sizeof(statcodes) /
sizeof(statcodes[0]); i++) {
1363 #define EQ(s1) (strcmp(s1, inst) == 0) 1365 #define getnum (getnum_aux(L, L1, &pc)) 1366 #define getstring (getstring_aux(L, buff, &pc)) 1367 #define getindex (getindex_aux(L, L1, &pc)) 1381 static const char ops[] =
"+-*%^/\\&|~<>_!";
1386 if (pc == NULL)
return luaL_error(L,
"attempt to runC null script");
1388 const char *inst = getstring;
1390 else if EQ("absindex") {
1393 else if EQ(
"append") {
1398 else if EQ(
"arith") {
1401 op = strchr(ops, *pc++) - ops;
1404 else if EQ(
"call") {
1409 else if EQ(
"callk") {
1415 else if EQ(
"checkstack") {
1417 const char *msg = getstring;
1422 else if EQ(
"rawcheckstack") {
1426 else if EQ(
"compare") {
1427 const char *opt = getstring;
1428 int op = (opt[0] ==
'E') ?
LUA_OPEQ 1434 else if EQ(
"concat") {
1437 else if EQ(
"copy") {
1441 else if EQ(
"func2num") {
1445 else if EQ(
"getfield") {
1449 else if EQ(
"getglobal") {
1452 else if EQ(
"getmetatable") {
1456 else if EQ(
"gettable") {
1459 else if EQ(
"gettop") {
1462 else if EQ(
"gsub") {
1468 else if EQ(
"insert") {
1471 else if EQ(
"iscfunction") {
1474 else if EQ(
"isfunction") {
1477 else if EQ(
"isnil") {
1480 else if EQ(
"isnull") {
1483 else if EQ(
"isnumber") {
1486 else if EQ(
"isstring") {
1489 else if EQ(
"istable") {
1492 else if EQ(
"isudataval") {
1495 else if EQ(
"isuserdata") {
1501 else if EQ(
"Llen") {
1504 else if EQ(
"loadfile") {
1507 else if EQ(
"loadstring") {
1511 else if EQ(
"newmetatable") {
1514 else if EQ(
"newtable") {
1517 else if EQ(
"newthread") {
1520 else if EQ(
"resetthread") {
1523 else if EQ(
"newuserdata") {
1526 else if EQ(
"next") {
1529 else if EQ(
"objsize") {
1532 else if EQ(
"pcall") {
1537 else if EQ(
"pcallk") {
1541 status =
lua_pcallk(L1, narg, nres, 0, i, Cfunck);
1546 else if EQ(
"printstack") {
1552 else printstack(L1);
1554 else if EQ(
"print") {
1555 const char *msg = getstring;
1556 printf(
"%s\n", msg);
1558 else if EQ(
"warningC") {
1559 const char *msg = getstring;
1562 else if EQ(
"warning") {
1563 const char *msg = getstring;
1566 else if EQ(
"pushbool") {
1569 else if EQ(
"pushcclosure") {
1572 else if EQ(
"pushint") {
1575 else if EQ(
"pushnil") {
1578 else if EQ(
"pushnum") {
1581 else if EQ(
"pushstatus") {
1584 else if EQ(
"pushstring") {
1587 else if EQ(
"pushupvalueindex") {
1590 else if EQ(
"pushvalue") {
1593 else if EQ(
"pushfstringI") {
1596 else if EQ(
"pushfstringS") {
1599 else if EQ(
"pushfstringP") {
1602 else if EQ(
"rawget") {
1606 else if EQ(
"rawgeti") {
1610 else if EQ(
"rawgetp") {
1614 else if EQ(
"rawset") {
1618 else if EQ(
"rawseti") {
1622 else if EQ(
"rawsetp") {
1626 else if EQ(
"remove") {
1629 else if EQ(
"replace") {
1632 else if EQ(
"resume") {
1637 else if EQ(
"return") {
1641 for (i = 0; i < n; i++) {
1655 else if EQ(
"rotate") {
1659 else if EQ(
"setfield") {
1661 const char *s = getstring;
1664 else if EQ(
"seti") {
1668 else if EQ(
"setglobal") {
1669 const char *s = getstring;
1672 else if EQ(
"sethook") {
1675 const char *s = getstring;
1676 sethookaux(L1, mask, count, s);
1678 else if EQ(
"setmetatable") {
1682 else if EQ(
"settable") {
1685 else if EQ(
"settop") {
1688 else if EQ(
"testudata") {
1692 else if EQ(
"error") {
1695 else if EQ(
"abort") {
1698 else if EQ(
"throw") {
1699 #if defined(__cplusplus) 1700 static struct X {
int x; } x;
1707 else if EQ(
"tobool") {
1710 else if EQ(
"tocfunction") {
1713 else if EQ(
"tointeger") {
1716 else if EQ(
"tonumber") {
1719 else if EQ(
"topointer") {
1722 else if EQ(
"touserdata") {
1725 else if EQ(
"tostring") {
1730 else if EQ(
"type") {
1733 else if EQ(
"xmove") {
1742 else if EQ(
"isyieldable") {
1745 else if EQ(
"yield") {
1748 else if EQ(
"yieldk") {
1753 else if EQ(
"toclose") {
1756 else luaL_error(L,
"unknown instruction %s", buff);
1777 return runC(L, L1, pc);
1816 const char *
const events [] = {
"call",
"ret",
"line",
"count",
"tailcall"};
1831 static void sethookaux (
lua_State *L,
int mask,
int count,
const char *scpt) {
1832 if (*scpt ==
'\0') {
1862 sethookaux(L, mask, count, scpt);
1888 static const struct luaL_Reg tests_funcs[] = {
1890 {
"closestate", closestate},
1892 {
"doonnewstack", doonnewstack},
1893 {
"doremote", doremote},
1894 {
"gccolor", gc_color},
1896 {
"gcstate", gc_state},
1897 {
"pobj", gc_printobj},
1899 {
"hash", hash_query},
1901 {
"limits", get_limits},
1902 {
"listcode", listcode},
1903 {
"printcode", printcode},
1905 {
"listabslineinfo", listabslineinfo},
1906 {
"listlocals", listlocals},
1907 {
"loadlib", loadlib},
1908 {
"checkpanic", checkpanic},
1909 {
"newstate", newstate},
1910 {
"newuserdata", newuserdata},
1911 {
"num2int", num2int},
1912 {
"pushuserdata", pushuserdata},
1913 {
"querystr", string_query},
1914 {
"querytab", table_query},
1916 {
"resume", coresume},
1918 {
"sethook", sethook},
1921 {
"makeCfunc", makeCfunc},
1922 {
"totalmem", mem_query},
1923 {
"alloccount", alloc_count},
1924 {
"allocfailnext", alloc_failnext},
1925 {
"trick", settrick},
1926 {
"udataval", udataval},
1928 {
"upvalue", upvalue},
1933 static void checkfinalmem (
void) {
1946 atexit(checkfinalmem);
LUA_API int lua_isstring(lua_State *L, int idx)
LUA_API const char * lua_getupvalue(lua_State *L, int funcindex, int n)
#define lua_isnoneornil(L, n)
LUA_API void lua_xmove(lua_State *from, lua_State *to, int n)
LUALIB_API int luaL_ref(lua_State *L, int t)
#define lua_pushcfunction(L, f)
LUA_API void lua_toclose(lua_State *L, int idx)
LUA_API int lua_rawget(lua_State *L, int idx)
int lua_resetthread(lua_State *L)
LUALIB_API int luaL_checkoption(lua_State *L, int arg, const char *def, const char *const lst[])
LUA_API int lua_yieldk(lua_State *L, int nresults, lua_KContext ctx, lua_KFunction k)
LUA_API void lua_pushnil(lua_State *L)
LUA_API int lua_isnumber(lua_State *L, int idx)
LUA_KCONTEXT lua_KContext
LUA_API const void * lua_topointer(lua_State *L, int idx)
LUA_API int lua_rawgeti(lua_State *L, int idx, lua_Integer n)
void lua_setwarnf(lua_State *L, lua_WarnFunction f, void *ud)
LUA_API int lua_isyieldable(lua_State *L)
LUA_API int lua_resume(lua_State *L, lua_State *from, int nargs, int *nresults)
LUA_API int lua_setmetatable(lua_State *L, int objindex)
LUAMOD_API int luaopen_debug(lua_State *L)
LUA_API int lua_toboolean(lua_State *L, int idx)
LUA_API void lua_rawsetp(lua_State *L, int idx, const void *p)
LUAMOD_API int luaopen_os(lua_State *L)
LUA_API void lua_setallocf(lua_State *L, lua_Alloc f, void *ud)
LUA_API void lua_rawset(lua_State *L, int idx)
LUA_API void * lua_touserdata(lua_State *L, int idx)
static int getnum(const char **fmt, int df)
LUA_API void lua_seti(lua_State *L, int idx, lua_Integer n)
static void warnf(void *ud, const char *message, int tocont)
LUALIB_API int luaL_loadstring(lua_State *L, const char *s)
LUA_API void lua_setfield(lua_State *L, int idx, const char *k)
#define LUA_PRELOAD_TABLE
#define lua_remove(L, idx)
LUA_API int lua_compare(lua_State *L, int index1, int index2, int op)
LUALIB_API const char * luaL_gsub(lua_State *L, const char *s, const char *p, const char *r)
#define lua_tointeger(L, i)
LUA_API lua_State * lua_newstate(lua_Alloc f, void *ud)
LUAMOD_API int luaopen_package(lua_State *L)
void luaC_runtilstate(lua_State *L, int statesmask)
LUA_API int lua_error(lua_State *L)
#define lua_tonumber(L, i)
#define luaL_typename(L, i)
LUAMOD_API int luaopen_coroutine(lua_State *L)
LUALIB_API int luaL_newmetatable(lua_State *L, const char *tname)
LUAI_FUNC int lua_checkmemory(lua_State *L)
#define getnodekey(L, obj, node)
LUA_API const char * lua_pushstring(lua_State *L, const char *s)
AbsLineInfo * abslineinfo
std::size_t hash(const BasicJsonType &j)
hash a JSON value
LUA_API int lua_isuserdata(lua_State *L, int idx)
const char * luaF_getlocalname(const Proto *f, int local_number, int pc)
LUAMOD_API int luaopen_io(lua_State *L)
LUA_API void lua_sethook(lua_State *L, lua_Hook func, int mask, int count)
LUAI_FUNC void lua_printobj(lua_State *L, struct GCObject *o)
LUA_API void * debug_realloc(void *ud, void *block, size_t osize, size_t nsize)
static int stacklevel(FuncState *fs, int nvar)
#define luaL_loadbuffer(L, s, sz, n)
LUA_API void lua_pushvalue(lua_State *L, int idx)
LUA_API int lua_rawgetp(lua_State *L, int idx, const void *p)
#define luaL_loadfile(L, f)
LUA_API void lua_settop(lua_State *L, int idx)
LUA_API int lua_getmetatable(lua_State *L, int objindex)
#define lua_isthread(L, n)
LUA_API void lua_setglobal(lua_State *L, const char *name)
LUA_API int lua_getglobal(lua_State *L, const char *name)
#define lua_upvalueindex(i)
LUAMOD_API int luaopen_table(lua_State *L)
#define lua_pcall(L, n, r, f)
int luaO_ceillog2(unsigned int x)
LUALIB_API void * luaL_testudata(lua_State *L, int ud, const char *tname)
LUAMOD_API int luaopen_base(lua_State *L)
int(* lua_CFunction)(lua_State *L)
struct lua_State * mainthread
LUALIB_API const char * luaL_checklstring(lua_State *L, int arg, size_t *len)
LUA_API lua_CFunction lua_atpanic(lua_State *L, lua_CFunction panicf)
#define lua_newuserdata(L, s)
LUA_API void lua_settable(lua_State *L, int idx)
void *(* lua_Alloc)(void *ud, void *ptr, size_t osize, size_t nsize)
LUA_API void lua_pushboolean(lua_State *L, int b)
LUA_API int lua_iscfunction(lua_State *L, int idx)
LUA_API void lua_rawseti(lua_State *L, int idx, lua_Integer n)
#define LFIELDS_PER_FLUSH
LUA_API void lua_close(lua_State *L)
static void block(LexState *ls)
LUA_API int lua_pcallk(lua_State *L, int nargs, int nresults, int errfunc, lua_KContext ctx, lua_KFunction k)
LUA_API lua_CFunction lua_tocfunction(lua_State *L, int idx)
LUA_API void lua_arith(lua_State *L, int op)
LUA_API int luaB_opentests(lua_State *L)
#define setsvalue2s(L, o, s)
LUA_API lua_State * lua_tothread(lua_State *L, int idx)
#define lua_pushliteral(L, s)
LUALIB_API lua_Integer luaL_len(lua_State *L, int idx)
LUALIB_API void luaL_unref(lua_State *L, int t, int ref)
LUALIB_API void luaL_checkany(lua_State *L, int arg)
LUALIB_API void luaL_checkstack(lua_State *L, int space, const char *msg)
LUA_API int lua_next(lua_State *L, int idx)
LUALIB_API const char * luaL_tolstring(lua_State *L, int idx, size_t *len)
#define lua_islightuserdata(L, n)
LUA_API void lua_concat(lua_State *L, int n)
LUALIB_API lua_Integer luaL_checkinteger(lua_State *L, int arg)
LUALIB_API void luaL_requiref(lua_State *L, const char *modname, lua_CFunction openf, int glb)
LUA_API void * lua_newuserdatauv(lua_State *L, size_t size, int nuvalue)
LUAMOD_API int luaopen_string(lua_State *L)
#define lua_isfunction(L, n)
LUA_API int lua_absindex(lua_State *L, int idx)
LUA_API int lua_type(lua_State *L, int idx)
LUA_API void lua_createtable(lua_State *L, int narray, int nrec)
#define lua_longassert(c)
LUA_API void lua_callk(lua_State *L, int nargs, int nresults, lua_KContext ctx, lua_KFunction k)
#define lua_replace(L, idx)
LUALIB_API lua_Integer luaL_optinteger(lua_State *L, int arg, lua_Integer def)
LUAMOD_API int luaopen_math(lua_State *L)
#define lua_tostring(L, i)
LUA_API void lua_copy(lua_State *L, int fromidx, int toidx)
LUA_API void lua_pushcclosure(lua_State *L, lua_CFunction fn, int n)
static void checkstack(lua_State *L, lua_State *L1, int n)
LUALIB_API int luaL_error(lua_State *L, const char *fmt,...)
#define luaL_newlib(L, l)
#define checkliveness(L, obj)
#define lua_call(L, n, r)
LUA_API void lua_rotate(lua_State *L, int idx, int n)
#define luaL_argcheck(L, cond, arg, extramsg)
LUA_API lua_State * lua_newthread(lua_State *L)
LUA_API lua_Alloc lua_getallocf(lua_State *L, void **ud)
LUALIB_API int luaL_getsubtable(lua_State *L, int idx, const char *fname)
LUA_API void lua_pushinteger(lua_State *L, lua_Integer n)
#define LUA_REGISTRYINDEX
LUA_API void lua_pushlightuserdata(lua_State *L, void *p)
LUALIB_API void luaL_checktype(lua_State *L, int arg, int t)
struct CallInfo * previous
#define lua_istable(L, n)
LUA_API void lua_len(lua_State *L, int idx)
LUALIB_API lua_Number luaL_checknumber(lua_State *L, int arg)
LUA_API const char * lua_pushfstring(lua_State *L, const char *fmt,...)
LUA_API const char * lua_setupvalue(lua_State *L, int funcindex, int n)
#define lua_insert(L, idx)
unsigned long objcount[LUA_NUMTYPES]
LUA_API const char * lua_pushlstring(lua_State *L, const char *s, size_t len)
void lua_warning(lua_State *L, const char *msg, int tocont)
LUAI_FUNC unsigned int luaH_realasize(const Table *t)
LUA_API int lua_getfield(lua_State *L, int idx, const char *k)
static const char *const opnames[]
struct UpVal::@22::@23 open
LUA_API void lua_pushnumber(lua_State *L, lua_Number n)
#define luaL_optstring(L, n, d)
#define setobj2s(L, o1, o2)
LUA_API int lua_checkstack(lua_State *L, int n)
LUA_API int lua_gettable(lua_State *L, int idx)
struct CallInfo::@30::@32 l
int luaG_getfuncline(const Proto *f, int pc)
LUA_API int lua_gettop(lua_State *L)
LUA_API lua_Unsigned lua_rawlen(lua_State *L, int idx)
LUA_API Memcontrol l_memcontrol
#define luaL_checkstring(L, n)