24 #define LOG_LUA LOG_STREAM(info, log_scripting_lua)
27 static void value_to_stringstream(
31 const bool verbose_table =
true)
39 output <<
"BOOLEAN; VALUE: " << (
lua_toboolean(L, i) ?
"true" :
"false");
45 output <<
"NIL; VALUE: nil";
57 output <<
"\n" << indent <<
"KEY: ";
58 const int keytype =
lua_type(L, keyindex);
74 value_to_stringstream(output, keyindex + 1, L, indent);
99 void ds(
lua_State *L,
const bool verbose_table) {
103 for (
int i = 1; i <= top; ++
i) {
104 output <<
"INDEX: " << i <<
"; TYPE: ";
105 value_to_stringstream(output, i, L,
"", verbose_table);
LUA_API int lua_type(lua_State *L, int idx)
LUA_API int lua_gettop(lua_State *L)
#define LUA_TLIGHTUSERDATA
#define lua_tonumber(L, i)
static lg::log_domain log_scripting_lua("scripting/lua")
LUA_API int lua_toboolean(lua_State *L, int idx)
LUA_API void lua_pushnil(lua_State *L)
static const char * output
#define lua_tostring(L, i)
LUA_API const void * lua_topointer(lua_State *L, int idx)
GLsizei const GLcharARB ** string
LUA_API int lua_next(lua_State *L, int idx)