+
+static void stackDump (lua_State *L) {
+ int i;
+ int top = lua_gettop(L);
+ void *p;
+ fflush(stdout);
+ return;
+ INFO0("That's me");
+ printf("STACK(top=%d): ",top);
+ for (i = 1; i <= top; i++) { /* repeat for each level */
+ int t = lua_type(L, i);
+ switch (t) {
+
+ case LUA_TSTRING: /* strings */
+ printf("`%s'", lua_tostring(L, i));
+ break;
+
+ case LUA_TBOOLEAN: /* booleans */
+ printf(lua_toboolean(L, i) ? "true" : "false");
+ break;
+
+ case LUA_TNUMBER: /* numbers */
+ printf("%g", lua_tonumber(L, i));
+ break;
+
+ default: /* other values */
+ if ((p = luaL_checkudata(L,i,TASK))) {
+ printf("task");
+ } else {
+ printf("%s", lua_typename(L, t));
+ }
+ break;
+
+ }
+ printf(" "); /* put a separator */
+ }
+ printf("\n"); /* end the listing */
+ fflush(stdout);
+}
+