mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-04-21 14:23:26 +00:00
Nicer print output for itern special key
This commit is contained in:
parent
5ca3897c4f
commit
1705bde0eb
@ -521,6 +521,11 @@ GCstr * LJ_FASTCALL lj_strfmt_obj(lua_State *L, cTValue *o)
|
||||
return lj_str_newlit(L, "true");
|
||||
} else {
|
||||
char buf[8+2+2+16], *p = buf;
|
||||
if (tvislightud(o) && o->u32.hi == LJ_KEYINDEX) {
|
||||
p = lj_buf_wmem(p, "iterator@", 9);
|
||||
p = lj_strfmt_wint(p, o->u32.lo);
|
||||
return lj_str_new(L, buf, (size_t)(p - buf));
|
||||
}
|
||||
p = lj_buf_wmem(p, lj_typename(o), (MSize)strlen(lj_typename(o)));
|
||||
*p++ = ':'; *p++ = ' ';
|
||||
if (tvisfunc(o) && isffunc(funcV(o))) {
|
||||
|
Loading…
Reference in New Issue
Block a user