diff options
author | Paul Kulchenko <paul@kulchenko.com> | 2015-12-15 20:24:41 -0800 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2015-12-22 09:01:54 +0100 |
commit | db1df45494330a0e63a5a14255ac8e2a503e46ea (patch) | |
tree | 230c01fd7e0d73a0227c72da209b7436c1be6b9e | |
parent | c428066af2bf4272fd3e4b9531c8058354144ff5 (diff) | |
download | redis-testing.tar.gz |
Update pretty printing in debugging to generate valid Lua code for userdata-like types.testing
-rw-r--r-- | src/scripting.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/scripting.c b/src/scripting.c index 5ba25846d..00d75f8bf 100644 --- a/src/scripting.c +++ b/src/scripting.c @@ -1916,11 +1916,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; |