YJIT: Avoid pointer size assumption with intptr_t
Cast to `void *` first to use the definition of `intptr_t`.
This commit is contained in:
parent
d5fc3fa4db
commit
2d2ee338f3
Notes:
git
2021-12-30 22:22:21 +09:00
@ -1180,8 +1180,7 @@ rb_yjit_call_threshold(void)
|
|||||||
return rb_yjit_opts.call_threshold;
|
return rb_yjit_opts.call_threshold;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* assume sizeof(void*) == sizeof(size_t) */
|
# define PTR2NUM(x) (rb_int2inum((intptr_t)(void *)(x)))
|
||||||
# define PTR2NUM(x) (SSIZET2NUM((ssize_t)(x)))
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* call-seq: block.id -> unique_id
|
* call-seq: block.id -> unique_id
|
||||||
|
Loading…
x
Reference in New Issue
Block a user