Commit f054b4ac authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo
Browse files

Merge pull request #2957 from pkulchenko/debug-userdata-pretty-printing

Update pretty printing in debugging to generate valid Lua code for userdata-like types.
parents 80b70371 b754c8e1
......@@ -1915,11 +1915,11 @@ sds ldbCatStackValue(sds s, lua_State *lua, int idx) {
else if (t == LUA_TUSERDATA) typename = "userdata";
else if (t == LUA_TTHREAD) typename = "thread";
else if (t == LUA_TLIGHTUSERDATA) typename = "light-userdata";
s = sdscatprintf(s,"%s@%p",typename,p);
s = sdscatprintf(s,"\"%s@%p\"",typename,p);
}
break;
default:
s = sdscat(s,"<unknown-lua-type>");
s = sdscat(s,"\"<unknown-lua-type>\"");
break;
}
return s;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment