diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-25 02:52:34 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-06-25 02:52:34 +0000 |
commit | faba0ee1c1464aecb10cdae7ea41fe8982fc0a2f (patch) | |
tree | 329ebc2137acbb0870bcada4f1038f1a4f1515fe /mjit.c | |
parent | 65ab2ab1c053a3277b2dedbbba52bbaafb59b65f (diff) | |
download | ruby-faba0ee1c1464aecb10cdae7ea41fe8982fc0a2f.tar.gz |
mjit.c: avoid signed pointer comparisons (fix for 32-bit)
ptrdiff_t is a signed type, use uintptr_t instead for unsigned
comparisons. This is needed to allow MJIT tests to pass on
32-bit x86 GNU/Linux.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.c')
-rw-r--r-- | mjit.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -946,7 +946,7 @@ convert_unit_to_func(struct rb_mjit_unit *unit) #endif } - if ((ptrdiff_t)func > (ptrdiff_t)LAST_JIT_ISEQ_FUNC) { + if ((uintptr_t)func > (uintptr_t)LAST_JIT_ISEQ_FUNC) { struct rb_mjit_unit_node *node = create_list_node(unit); CRITICAL_SECTION_START(3, "end of jit"); add_to_list(node, &active_units); @@ -1101,7 +1101,7 @@ mark_ec_units(rb_execution_context_t *ec) const rb_control_frame_t *cfp; rb_control_frame_t *last_cfp = ec->cfp; const rb_control_frame_t *end_marker_cfp; - ptrdiff_t i, size; + uintptr_t i, size; if (ec->vm_stack == NULL) return; |