diff options
author | Takashi Kokubun <[email protected]> | 2023-10-18 14:07:03 -0700 |
---|---|---|
committer | GitHub <[email protected]> | 2023-10-18 21:07:03 +0000 |
commit | f51b92fe231266a1a184b8329d43520599d2017b (patch) | |
tree | d5a1e218714a894e83b86981676f94f742114d76 /yjit/src/utils.rs | |
parent | 58ee088bb36874d4c63ef55e0d3287bb07ead9d2 (diff) |
YJIT: Add --yjit-perf (#8697)
Co-authored-by: Alan Wu <[email protected]>
Diffstat (limited to 'yjit/src/utils.rs')
-rw-r--r-- | yjit/src/utils.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/yjit/src/utils.rs b/yjit/src/utils.rs index 3a8f0ef590..a883e959a0 100644 --- a/yjit/src/utils.rs +++ b/yjit/src/utils.rs @@ -73,7 +73,7 @@ pub(crate) use offset_of; // Convert a CRuby UTF-8-encoded RSTRING into a Rust string. // This should work fine on ASCII strings and anything else // that is considered legal UTF-8, including embedded nulls. -fn ruby_str_to_rust(v: VALUE) -> String { +pub fn ruby_str_to_rust(v: VALUE) -> String { let str_ptr = unsafe { rb_RSTRING_PTR(v) } as *mut u8; let str_len: usize = unsafe { rb_RSTRING_LEN(v) }.try_into().unwrap(); let str_slice: &[u8] = unsafe { slice::from_raw_parts(str_ptr, str_len) }; |