Compare commits

..

1 Commits

Author SHA1 Message Date
Ilya Leoshkevich
b0be612ef6
Merge 035f133798 into 538a82133a 2025-03-12 16:42:27 +08:00
2 changed files with 2 additions and 6 deletions

View File

@ -122,9 +122,8 @@ LUALIB_API int luaL_loadfilex(lua_State *L, const char *filename,
copyTV(L, L->top-1, L->top); copyTV(L, L->top-1, L->top);
} }
if (err) { if (err) {
const char *fname = filename ? filename : "stdin";
L->top--; L->top--;
lua_pushfstring(L, "cannot read %s: %s", fname, strerror(err)); lua_pushfstring(L, "cannot read %s: %s", chunkname+1, strerror(err));
return LUA_ERRFILE; return LUA_ERRFILE;
} }
return status; return status;

View File

@ -1107,10 +1107,7 @@ int lj_record_mm_lookup(jit_State *J, RecordIndex *ix, MMS mm)
return 0; /* No metamethod. */ return 0; /* No metamethod. */
} }
/* The cdata metatable is treated as immutable. */ /* The cdata metatable is treated as immutable. */
if (LJ_HASFFI && tref_iscdata(ix->tab)) { if (LJ_HASFFI && tref_iscdata(ix->tab)) goto immutable_mt;
mix.tab = TREF_NIL;
goto immutable_mt;
}
ix->mt = mix.tab = lj_ir_ggfload(J, IRT_TAB, ix->mt = mix.tab = lj_ir_ggfload(J, IRT_TAB,
GG_OFS(g.gcroot[GCROOT_BASEMT+itypemap(&ix->tabv)])); GG_OFS(g.gcroot[GCROOT_BASEMT+itypemap(&ix->tabv)]));
goto nocheck; goto nocheck;