aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lj_load.c3
-rw-r--r--src/lj_record.c5
2 files changed, 6 insertions, 2 deletions
diff --git a/src/lj_load.c b/src/lj_load.c
index 828bf8ae..24b660a8 100644
--- a/src/lj_load.c
+++ b/src/lj_load.c
@@ -122,8 +122,9 @@ LUALIB_API int luaL_loadfilex(lua_State *L, const char *filename,
122 copyTV(L, L->top-1, L->top); 122 copyTV(L, L->top-1, L->top);
123 } 123 }
124 if (err) { 124 if (err) {
125 const char *fname = filename ? filename : "stdin";
125 L->top--; 126 L->top--;
126 lua_pushfstring(L, "cannot read %s: %s", chunkname+1, strerror(err)); 127 lua_pushfstring(L, "cannot read %s: %s", fname, strerror(err));
127 return LUA_ERRFILE; 128 return LUA_ERRFILE;
128 } 129 }
129 return status; 130 return status;
diff --git a/src/lj_record.c b/src/lj_record.c
index c6a082d4..ad45bebb 100644
--- a/src/lj_record.c
+++ b/src/lj_record.c
@@ -1107,7 +1107,10 @@ int lj_record_mm_lookup(jit_State *J, RecordIndex *ix, MMS mm)
1107 return 0; /* No metamethod. */ 1107 return 0; /* No metamethod. */
1108 } 1108 }
1109 /* The cdata metatable is treated as immutable. */ 1109 /* The cdata metatable is treated as immutable. */
1110 if (LJ_HASFFI && tref_iscdata(ix->tab)) goto immutable_mt; 1110 if (LJ_HASFFI && tref_iscdata(ix->tab)) {
1111 mix.tab = TREF_NIL;
1112 goto immutable_mt;
1113 }
1111 ix->mt = mix.tab = lj_ir_ggfload(J, IRT_TAB, 1114 ix->mt = mix.tab = lj_ir_ggfload(J, IRT_TAB,
1112 GG_OFS(g.gcroot[GCROOT_BASEMT+itypemap(&ix->tabv)])); 1115 GG_OFS(g.gcroot[GCROOT_BASEMT+itypemap(&ix->tabv)]));
1113 goto nocheck; 1116 goto nocheck;