Expose the address of MJIT Pointers (#7446)

This way we can manually dereference pointers with Fiddle
This commit is contained in:
Aaron Patterson 2023-03-05 13:00:34 -08:00 committed by GitHub
parent 1b4c1492c1
commit fc5482d088
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
Notes: git 2023-03-05 21:00:59 +00:00
Merged-By: k0kubun <takashikkbn@gmail.com>

View File

@ -253,6 +253,11 @@ module RubyVM::MJIT # :nodoc: all
[value.to_i].pack(Fiddle::PackInfo::PACK_MAP[Fiddle::TYPE_VOIDP])
end
# Get a raw address
def to_i
@addr
end
private
def dest_addr