mirror of
https://github.com/LuaJIT/LuaJIT.git
synced 2025-02-07 23:24:09 +00:00
Add stricter check for print() vs. tostring() shortcut.
This commit is contained in:
parent
16e5605eec
commit
46a1b268eb
@ -504,7 +504,8 @@ LJLIB_CF(print)
|
|||||||
lua_gettable(L, LUA_GLOBALSINDEX);
|
lua_gettable(L, LUA_GLOBALSINDEX);
|
||||||
tv = L->top-1;
|
tv = L->top-1;
|
||||||
}
|
}
|
||||||
shortcut = (tvisfunc(tv) && funcV(tv)->c.ffid == FF_tostring);
|
shortcut = (tvisfunc(tv) && funcV(tv)->c.ffid == FF_tostring)
|
||||||
|
&& !gcrefu(basemt_it(G(L), LJ_TNUMX));
|
||||||
for (i = 0; i < nargs; i++) {
|
for (i = 0; i < nargs; i++) {
|
||||||
const char *str;
|
const char *str;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
Loading…
Reference in New Issue
Block a user