MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / printcode

Function printcode

Dependencies/lua/src/ltests.c:749–762  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

747
748
749static int printcode (lua_State *L) {
750 int pc;
751 Proto *p;
752 luaL_argcheck(L, lua_isfunction(L, 1) && !lua_iscfunction(L, 1),
753 1, "Lua function expected");
754 p = getproto(obj_at(L, 1));
755 printf("maxstack: %d\n", p->maxstacksize);
756 printf("numparams: %d\n", p->numparams);
757 for (pc=0; pc<p->sizecode; pc++) {
758 char buff[100];
759 printf("%s\n", buildop(p, pc, buff));
760 }
761 return 0;
762}
763
764
765static int listk (lua_State *L) {

Callers

nothing calls this directly

Calls 2

lua_iscfunctionFunction · 0.85
buildopFunction · 0.85

Tested by

no test coverage detected