| 747 | |
| 748 | |
| 749 | static 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 | |
| 765 | static int listk (lua_State *L) { |
nothing calls this directly
no test coverage detected