mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
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
1 changed files with 1 additions and 2 deletions
|
@ -1180,8 +1180,7 @@ rb_yjit_call_threshold(void)
|
|||
return rb_yjit_opts.call_threshold;
|
||||
}
|
||||
|
||||
/* assume sizeof(void*) == sizeof(size_t) */
|
||||
# define PTR2NUM(x) (SSIZET2NUM((ssize_t)(x)))
|
||||
# define PTR2NUM(x) (rb_int2inum((intptr_t)(void *)(x)))
|
||||
|
||||
/**
|
||||
* call-seq: block.id -> unique_id
|
||||
|
|
Loading…
Add table
Reference in a new issue