Skip to content

Commit

Permalink
Merge pull request redis#2957 from pkulchenko/debug-userdata-pretty-p…
Browse files Browse the repository at this point in the history
…rinting

Update pretty printing in debugging to generate valid Lua code for userdata-like types.
  • Loading branch information
antirez committed Dec 22, 2015
2 parents 80b7037 + b754c8e commit f054b4a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/scripting.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit f054b4a

Please sign in to comment.