diff options
| author | Peter Zhu <peter@peterzhu.ca> | 2025-09-13 14:10:57 -0400 |
|---|---|---|
| committer | Peter Zhu <peter@peterzhu.ca> | 2025-09-15 09:25:20 -0400 |
| commit | b0ce1fd549a3227ef4d9f65e4cdf0df93e4adeb0 (patch) | |
| tree | 23ff1570f9d6fb06781982fb0e324e47e8bbbdbf /internal | |
| parent | 70210acab046239beedf880edf0330e3cb389ce8 (diff) | |
Combine rb_imemo_tmpbuf_auto_free_pointer and rb_imemo_tmpbuf_new
Diffstat (limited to 'internal')
| -rw-r--r-- | internal/imemo.h | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/internal/imemo.h b/internal/imemo.h index de39102432..3673190809 100644 --- a/internal/imemo.h +++ b/internal/imemo.h @@ -138,10 +138,8 @@ static inline enum imemo_type imemo_type(VALUE imemo); static inline int imemo_type_p(VALUE imemo, enum imemo_type imemo_type); static inline bool imemo_throw_data_p(VALUE imemo); static inline struct vm_ifunc *rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data); -static inline VALUE rb_imemo_tmpbuf_auto_free_pointer(void); static inline void *RB_IMEMO_TMPBUF_PTR(VALUE v); static inline void *rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr); -static inline VALUE rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str); static inline void MEMO_V1_SET(struct MEMO *m, VALUE v); static inline void MEMO_V2_SET(struct MEMO *m, VALUE v); @@ -201,7 +199,7 @@ rb_vm_ifunc_proc_new(rb_block_call_func_t func, const void *data) } static inline VALUE -rb_imemo_tmpbuf_auto_free_pointer(void) +rb_imemo_tmpbuf_new(void) { return rb_imemo_new(imemo_tmpbuf, 0, sizeof(rb_imemo_tmpbuf_t)); } @@ -220,7 +218,7 @@ rb_imemo_tmpbuf_set_ptr(VALUE v, void *ptr) } static inline VALUE -rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str) +rb_imemo_tmpbuf_new_from_an_RString(VALUE str) { const void *src; VALUE imemo; @@ -230,7 +228,7 @@ rb_imemo_tmpbuf_auto_free_pointer_new_from_an_RString(VALUE str) StringValue(str); /* create tmpbuf to keep the pointer before xmalloc */ - imemo = rb_imemo_tmpbuf_auto_free_pointer(); + imemo = rb_imemo_tmpbuf_new(); tmpbuf = (rb_imemo_tmpbuf_t *)imemo; len = RSTRING_LEN(str); src = RSTRING_PTR(str); |
