Commit 075ea164 authored by Salvatore Sanfilippo's avatar Salvatore Sanfilippo
Browse files

Merge pull request #2954 from pkulchenko/debug-table-pretty-printing

Update pretty printing during debugging to generate valid Lua code for tables
parents f054b4ac 3969e9d3
...@@ -1886,8 +1886,9 @@ sds ldbCatStackValue(sds s, lua_State *lua, int idx) { ...@@ -1886,8 +1886,9 @@ sds ldbCatStackValue(sds s, lua_State *lua, int idx) {
repr1 = ldbCatStackValue(repr1,lua,-1); repr1 = ldbCatStackValue(repr1,lua,-1);
repr1 = sdscatlen(repr1,"; ",2); repr1 = sdscatlen(repr1,"; ",2);
/* Full repr. */ /* Full repr. */
repr2 = sdscatlen(repr2,"[",1);
repr2 = ldbCatStackValue(repr2,lua,-2); repr2 = ldbCatStackValue(repr2,lua,-2);
repr2 = sdscatlen(repr2,"=",1); repr2 = sdscatlen(repr2,"]=",2);
repr2 = ldbCatStackValue(repr2,lua,-1); repr2 = ldbCatStackValue(repr2,lua,-1);
repr2 = sdscatlen(repr2,"; ",2); repr2 = sdscatlen(repr2,"; ",2);
lua_pop(lua,1); /* Stack: table, key. Ready for next iteration. */ lua_pop(lua,1); /* Stack: table, key. Ready for next iteration. */
......
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