summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-19 09:48:47 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-11-19 09:48:47 +0000
commit301223df95b523ad355ccfe24da74028f4a77f5d (patch)
tree562f5ee2f35b2db39279cd5d67adc7e03962aeaf /internal.h
parent1d2fbdcf250e0231816094883cf49fe3ab30bd7d (diff)
* gc.c (rb_gc_resurrect): added.
rb_fstring() used rb_gc_mark() to avoid freeing used string. However, rb_gc_mark() set mark bit *and* pushes mark_stack. rb_gc_resurrect() does only set mark bit if it is before sweeping. * string.c (rb_fstring): use rb_gc_resurrect. * internal.h: add decl. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43718 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/internal.h b/internal.h
index cd2177afef..05bbbc74c8 100644
--- a/internal.h
+++ b/internal.h
@@ -435,6 +435,8 @@ void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR
void ruby_sized_xfree(void *x, size_t size);
#define SIZED_REALLOC_N(var,type,n,old_n) ((var)=(type*)ruby_sized_xrealloc((char*)(var), (n) * sizeof(type), (old_n) * sizeof(type)))
+void rb_gc_resurrect(VALUE ptr);
+
/* hash.c */
struct st_table *rb_hash_tbl_raw(VALUE hash);
#define RHASH_TBL_RAW(h) rb_hash_tbl_raw(h)