Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b754c8e1
Commit
b754c8e1
authored
Dec 15, 2015
by
Paul Kulchenko
Browse files
Update pretty printing in debugging to generate valid Lua code for userdata-like types.
parent
9f63e75a
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/scripting.c
View file @
b754c8e1
...
@@ -1911,11 +1911,11 @@ sds ldbCatStackValue(sds s, lua_State *lua, int idx) {
...
@@ -1911,11 +1911,11 @@ sds ldbCatStackValue(sds s, lua_State *lua, int idx) {
else
if
(
t
==
LUA_TUSERDATA
)
typename
=
"userdata"
;
else
if
(
t
==
LUA_TUSERDATA
)
typename
=
"userdata"
;
else
if
(
t
==
LUA_TTHREAD
)
typename
=
"thread"
;
else
if
(
t
==
LUA_TTHREAD
)
typename
=
"thread"
;
else
if
(
t
==
LUA_TLIGHTUSERDATA
)
typename
=
"light-userdata"
;
else
if
(
t
==
LUA_TLIGHTUSERDATA
)
typename
=
"light-userdata"
;
s
=
sdscatprintf
(
s
,
"%s@%p"
,
typename
,
p
);
s
=
sdscatprintf
(
s
,
"
\"
%s@%p
\"
"
,
typename
,
p
);
}
}
break
;
break
;
default:
default:
s
=
sdscat
(
s
,
"<unknown-lua-type>"
);
s
=
sdscat
(
s
,
"
\"
<unknown-lua-type>
\"
"
);
break
;
break
;
}
}
return
s
;
return
s
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment