diff options
author | Peter Zhu <[email protected]> | 2025-01-07 11:00:16 -0500 |
---|---|---|
committer | Peter Zhu <[email protected]> | 2025-01-08 09:11:59 -0500 |
commit | 62a1528020de16c2f60ec1aea563f7b764946c59 (patch) | |
tree | e6e3194dfca1c1537727fb9c3a20b08709ee6b86 /imemo.c | |
parent | 051af9529b03c11aff8f6a09522c69983e3a9d72 (diff) |
Pass allocation size to rb_imemo_new
This would allow imemo to take advantage of VWA and allocate sizes larger
than RVALUE (40 bytes).
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/12524
Diffstat (limited to 'imemo.c')
-rw-r--r-- | imemo.c | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -40,9 +40,8 @@ rb_imemo_name(enum imemo_type type) * ========================================================================= */ VALUE -rb_imemo_new(enum imemo_type type, VALUE v0) +rb_imemo_new(enum imemo_type type, VALUE v0, size_t size) { - size_t size = RVALUE_SIZE; VALUE flags = T_IMEMO | FL_WB_PROTECTED | (type << FL_USHIFT); NEWOBJ_OF(obj, void, v0, flags, size, 0); |