Fix a compilation warning on Mac

../mjit_c.rb:493:17: warning: implicit conversion loses integer precision: 'ID' (aka 'unsigned long') to 'unsigned int' [-Wshorten-64-to-32]
return UINT2NUM(vm_ci_mid((CALL_INFO)NUM2PTR(_ci_addr)));
       ~~~~~~~~ ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
This commit is contained in:
Takashi Kokubun 2023-03-06 13:20:53 -08:00
parent a1758fbd7f
commit b116b2bcf6

View File

@ -490,7 +490,7 @@ module RubyVM::MJIT # :nodoc: all
def vm_ci_mid(ci)
_ci_addr = ci.to_i
Primitive.cexpr! 'UINT2NUM(vm_ci_mid((CALL_INFO)NUM2PTR(_ci_addr)))'
Primitive.cexpr! 'SIZET2NUM((size_t)vm_ci_mid((CALL_INFO)NUM2PTR(_ci_addr)))'
end
def rb_splat_or_kwargs_p(ci)