diff options
author | Peter Zhu <[email protected]> | 2023-06-06 10:19:20 -0400 |
---|---|---|
committer | GitHub <[email protected]> | 2023-06-06 10:19:20 -0400 |
commit | 7577c101ed6452de3e72fadb43db595946acc701 (patch) | |
tree | deed85a09fc431132145897d7e1982fd61c74e0c /yjit.c | |
parent | fae2f80d06f5058b40e91f62ba27fb01f2463d12 (diff) |
Unify length field for embedded and heap strings (#7908)
* Unify length field for embedded and heap strings
The length field is of the same type and position in RString for both
embedded and heap allocated strings, so we can unify it.
* Remove RSTRING_EMBED_LEN
Notes
Notes:
Merged-By: maximecb <[email protected]>
Diffstat (limited to 'yjit.c')
-rw-r--r-- | yjit.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -40,8 +40,7 @@ // Field offsets for the RString struct enum rstring_offsets { - RUBY_OFFSET_RSTRING_AS_HEAP_LEN = offsetof(struct RString, as.heap.len), - RUBY_OFFSET_RSTRING_EMBED_LEN = offsetof(struct RString, as.embed.len), + RUBY_OFFSET_RSTRING_LEN = offsetof(struct RString, len) }; // We need size_t to have a known size to simplify code generation and FFI. |