Skip to content

Instantly share code, notes, and snippets.

@leodido
leodido / dumpstack.cpp
Created September 23, 2019 18:40
Dump the Lua stack
/*
* dump_stack(ls);
*/
void dump_stack(lua_State *L)
{
int i;
int top = lua_gettop(L);
printf("\n#### BOS ####\n");
for(i = top; i >= 1; i--)
{