Skip to content

Commit 46466ee

Browse files
committed
[GR-17027] Fix invalid pointer-to-long cast in ruby.h.
PullRequest: truffleruby/939
2 parents a06e9fa + aca765c commit 46466ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/cext/include/ruby/ruby.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ int rb_long2int(long value);
370370
#define MODET2NUM(v) INT2NUM(v)
371371
#endif
372372

373-
#define RB_FIX2LONG(x) ((long)(rb_tr_unwrap(x)))
373+
#define RB_FIX2LONG(x) (polyglot_as_i64(rb_tr_unwrap(x)))
374374
static inline long
375375
rb_fix2long(VALUE x)
376376
{

0 commit comments

Comments
 (0)