Skip to content

Commit 1e3e04c

Browse files
committed
Move rb_imemo_tmpbuf_new to imemo.c
1 parent 61df125 commit 1e3e04c

2 files changed

Lines changed: 7 additions & 6 deletions

File tree

imemo.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,12 @@ rb_imemo_new(enum imemo_type type, VALUE v0, size_t size)
4848
return (VALUE)obj;
4949
}
5050

51+
VALUE
52+
rb_imemo_tmpbuf_new(void)
53+
{
54+
return rb_imemo_new(imemo_tmpbuf, 0, sizeof(rb_imemo_tmpbuf_t));
55+
}
56+
5157
void *
5258
rb_alloc_tmp_buffer_with_count(volatile VALUE *store, size_t size, size_t cnt)
5359
{

internal/imemo.h

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@ struct MEMO {
132132
#ifndef RUBY_RUBYPARSER_H
133133
typedef struct rb_imemo_tmpbuf_struct rb_imemo_tmpbuf_t;
134134
#endif
135+
VALUE rb_imemo_tmpbuf_new(void);
135136
rb_imemo_tmpbuf_t *rb_imemo_tmpbuf_parser_heap(void *buf, rb_imemo_tmpbuf_t *old_heap, size_t cnt);
136137
struct vm_ifunc *rb_vm_ifunc_new(rb_block_call_func_t func, const void *data, int min_argc, int max_argc);
137138
static inline enum imemo_type imemo_type(VALUE imemo);
@@ -198,12 +199,6 @@ rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data)
198199
return rb_vm_ifunc_new(func, data, 0, UNLIMITED_ARGUMENTS);
199200
}
200201

201-
static inline VALUE
202-
rb_imemo_tmpbuf_new(void)
203-
{
204-
return rb_imemo_new(imemo_tmpbuf, 0, sizeof(rb_imemo_tmpbuf_t));
205-
}
206-
207202
static inline void *
208203
RB_IMEMO_TMPBUF_PTR(VALUE v)
209204
{

0 commit comments

Comments
 (0)