aboutsummaryrefslogtreecommitdiffstats
path: root/mjit.h
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-03 21:29:18 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-07-03 21:29:18 +0000
commit3f6f9cac047f51ecac728f4af0f734faa3d4ccf9 (patch)
tree96d7989e5d4cf20709a40afcec64ddced8d84a56 /mjit.h
parentb96076abd337774929b3d416376ba446da44ebc6 (diff)
downloadruby-3f6f9cac047f51ecac728f4af0f734faa3d4ccf9.tar.gz
mjit.h: avoid signed pointer comparisons (fix for 32-bit)
ptrdiff_t is a signed type, use uintptr_t instead for unsigned comparisons. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63844 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mjit.h')
-rw-r--r--mjit.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/mjit.h b/mjit.h
index 9460d7595f..a2a085c720 100644
--- a/mjit.h
+++ b/mjit.h
@@ -103,7 +103,7 @@ mjit_exec(rb_execution_context_t *ec)
total_calls = ++body->total_calls;
func = body->jit_func;
- if (UNLIKELY((ptrdiff_t)func <= (ptrdiff_t)LAST_JIT_ISEQ_FUNC)) {
+ if (UNLIKELY((uintptr_t)func <= (uintptr_t)LAST_JIT_ISEQ_FUNC)) {
switch ((enum rb_mjit_iseq_func)func) {
case NOT_ADDED_JIT_ISEQ_FUNC:
if (total_calls == mjit_opts.min_calls && mjit_target_iseq_p(body)) {