summaryrefslogtreecommitdiff
path: root/src/lj_meta.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lj_meta.c')
-rw-r--r--src/lj_meta.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/lj_meta.c b/src/lj_meta.c
index 48cee510..22301db7 100644
--- a/src/lj_meta.c
+++ b/src/lj_meta.c
@@ -291,7 +291,7 @@ TValue *lj_meta_equal(lua_State *L, GCobj *o1, GCobj *o2, int ne)
291 if (tabref(o1->gch.metatable) != tabref(o2->gch.metatable)) { 291 if (tabref(o1->gch.metatable) != tabref(o2->gch.metatable)) {
292 cTValue *mo2 = lj_meta_fast(L, tabref(o2->gch.metatable), MM_eq); 292 cTValue *mo2 = lj_meta_fast(L, tabref(o2->gch.metatable), MM_eq);
293 if (mo2 == NULL || !lj_obj_equal(mo, mo2)) 293 if (mo2 == NULL || !lj_obj_equal(mo, mo2))
294 return cast(TValue *, (intptr_t)ne); 294 return (TValue *)(intptr_t)ne;
295 } 295 }
296 top = curr_top(L); 296 top = curr_top(L);
297 setcont(top, ne ? lj_cont_condf : lj_cont_condt); 297 setcont(top, ne ? lj_cont_condf : lj_cont_condt);
@@ -301,7 +301,7 @@ TValue *lj_meta_equal(lua_State *L, GCobj *o1, GCobj *o2, int ne)
301 setgcV(L, top+3, o2, it); 301 setgcV(L, top+3, o2, it);
302 return top+2; /* Trigger metamethod call. */ 302 return top+2; /* Trigger metamethod call. */
303 } 303 }
304 return cast(TValue *, (intptr_t)ne); 304 return (TValue *)(intptr_t)ne;
305} 305}
306 306
307#if LJ_HASFFI 307#if LJ_HASFFI
@@ -329,7 +329,7 @@ TValue * LJ_FASTCALL lj_meta_equal_cd(lua_State *L, BCIns ins)
329 if (LJ_LIKELY(!tvisnil(mo))) 329 if (LJ_LIKELY(!tvisnil(mo)))
330 return mmcall(L, cont, mo, o1, o2); 330 return mmcall(L, cont, mo, o1, o2);
331 else 331 else
332 return cast(TValue *, (intptr_t)(bc_op(ins) & 1)); 332 return (TValue *)(intptr_t)(bc_op(ins) & 1);
333} 333}
334#endif 334#endif
335 335
@@ -345,7 +345,7 @@ TValue *lj_meta_comp(lua_State *L, cTValue *o1, cTValue *o2, int op)
345 } else if (itype(o1) == itype(o2)) { /* Never called with two numbers. */ 345 } else if (itype(o1) == itype(o2)) { /* Never called with two numbers. */
346 if (tvisstr(o1) && tvisstr(o2)) { 346 if (tvisstr(o1) && tvisstr(o2)) {
347 int32_t res = lj_str_cmp(strV(o1), strV(o2)); 347 int32_t res = lj_str_cmp(strV(o1), strV(o2));
348 return cast(TValue *, (intptr_t)(((op&2) ? res <= 0 : res < 0) ^ (op&1))); 348 return (TValue *)(intptr_t)(((op&2) ? res <= 0 : res < 0) ^ (op&1));
349 } else { 349 } else {
350 trymt: 350 trymt:
351 while (1) { 351 while (1) {