summaryrefslogtreecommitdiff
path: root/internal
diff options
context:
space:
mode:
authorPeter Zhu <peter@peterzhu.ca>2025-12-22 19:38:47 -0500
committerPeter Zhu <peter@peterzhu.ca>2025-12-29 09:03:31 -0500
commit56147001ec439a7d6b887402c8a66d3ee625e598 (patch)
treee49d5139c155b7fe4066525bc0f6124c7202177e /internal
parentda89f7f58d6e0a662dfdeaf7df7aea9e3e7c02b5 (diff)
Move MEMO_NEW to imemo.c and rename to rb_imemo_memo_new
Diffstat (limited to 'internal')
-rw-r--r--internal/imemo.h12
1 files changed, 1 insertions, 11 deletions
diff --git a/internal/imemo.h b/internal/imemo.h
index f8bda26f0b..7192631e92 100644
--- a/internal/imemo.h
+++ b/internal/imemo.h
@@ -134,6 +134,7 @@ typedef struct rb_imemo_tmpbuf_struct rb_imemo_tmpbuf_t;
#endif
VALUE rb_imemo_new(enum imemo_type type, VALUE v0, size_t size, bool is_shareable);
VALUE rb_imemo_tmpbuf_new(void);
+struct MEMO *rb_imemo_memo_new(VALUE a, VALUE b, VALUE c);
struct vm_ifunc *rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc);
static inline enum imemo_type imemo_type(VALUE imemo);
static inline int imemo_type_p(VALUE imemo, enum imemo_type imemo_type);
@@ -152,17 +153,6 @@ RUBY_SYMBOL_EXPORT_BEGIN
const char *rb_imemo_name(enum imemo_type type);
RUBY_SYMBOL_EXPORT_END
-static inline struct MEMO *
-MEMO_NEW(VALUE a, VALUE b, VALUE c)
-{
- struct MEMO *memo = IMEMO_NEW(struct MEMO, imemo_memo, 0);
- *((VALUE *)&memo->v1) = a;
- *((VALUE *)&memo->v2) = b;
- *((VALUE *)&memo->u3.value) = c;
-
- return memo;
-}
-
static inline enum imemo_type
imemo_type(VALUE imemo)
{