summaryrefslogtreecommitdiff
path: root/imemo.c
diff options
context:
space:
mode:
authorPeter Zhu <[email protected]>2025-01-07 11:00:16 -0500
committerPeter Zhu <[email protected]>2025-01-08 09:11:59 -0500
commit62a1528020de16c2f60ec1aea563f7b764946c59 (patch)
treee6e3194dfca1c1537727fb9c3a20b08709ee6b86 /imemo.c
parent051af9529b03c11aff8f6a09522c69983e3a9d72 (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.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/imemo.c b/imemo.c
index 0a3b7d7187..f573967817 100644
--- a/imemo.c
+++ b/imemo.c
@@ -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);