summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-17 08:35:06 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-10-17 08:35:06 +0000
commit3de7ec0a3f74932d1b65089e606f194cb816e165 (patch)
tree03ea8903abe36a126c348dd945bee64e00c1eba4 /internal.h
parentd66c5768caaee16a0c2c2c6411858d23fb9f21a9 (diff)
* array.c, string.c: use ruby_xsizedfree() and ruby_xsizedrealloc().
* internal.h (SIZED_REALLOC_N): define a macro as REALLOC_N(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43332 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'internal.h')
-rw-r--r--internal.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/internal.h b/internal.h
index b8c0df6e17..efa5c1e83f 100644
--- a/internal.h
+++ b/internal.h
@@ -434,6 +434,7 @@ void rb_gc_writebarrier_remember_promoted(VALUE obj);
void *ruby_xsizedrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_ALLOC_SIZE((2));;
void ruby_xsizedfree(void *x, size_t size);
+#define SIZED_REALLOC_N(var,type,n,old_n) ((var)=(type*)ruby_xsizedrealloc((char*)(var), (n) * sizeof(type), (old_n) * sizeof(type)))
/* hash.c */
struct st_table *rb_hash_tbl_raw(VALUE hash);