diff options
author | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-09 07:08:53 +0000 |
---|---|---|
committer | mame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-05-09 07:08:53 +0000 |
commit | af0696782d78c6939d325dbe587a722b88f7e5dc (patch) | |
tree | 19dfdcfdb6817d35069fb6310554c660f7ccc60c /internal.h | |
parent | 01d998aafe12e1ff5a93037d5d730ecf0f205664 (diff) |
gc.c (rb_imemo_alloc_new): split for each purpose
imemo_alloc is used for three purposes: auto-free pointer (alternative
of alloca), alloc_tmp_buffer, and heap allocation for bison.
To make it clear, this change introduces three functions:
rb_imemo_alloc_auto_free_pointer,
rb_imemo_alloc_auto_free_maybe_mark_buffer, and
rb_imemo_alloc_parser_heap.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/internal.h b/internal.h index 304dcc1910..8cc765f15c 100644 --- a/internal.h +++ b/internal.h @@ -960,7 +960,9 @@ typedef struct rb_imemo_alloc_struct { size_t cnt; /* buffer size in VALUE */ } rb_imemo_alloc_t; -rb_imemo_alloc_t *rb_imemo_alloc_new(void *buf); +VALUE rb_imemo_alloc_auto_free_pointer(void *buf); +VALUE rb_imemo_alloc_auto_free_maybe_mark_buffer(void *buf, size_t cnt); +rb_imemo_alloc_t *rb_imemo_alloc_parser_heap(void *buf, rb_imemo_alloc_t *old_heap, size_t cnt); void rb_strterm_mark(VALUE obj); |