summaryrefslogtreecommitdiff
path: root/internal.h
diff options
context:
space:
mode:
authornormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-23 05:51:43 +0000
committernormal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-05-23 05:51:43 +0000
commitb32b2a61060a93babfa2f97cbc0a32be81b57dc0 (patch)
treefd75d13c8684efe546ee803479911751a2c1577a /internal.h
parent3d90e2aead58e841a6f2fd2c59c9978849340c84 (diff)
internal.h: export ruby_sized_* for systems w/o malloc_usable_size
[ruby-core:87232] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@63493 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 0d71dce5e2..a072fa30dd 100644
--- a/internal.h
+++ b/internal.h
@@ -1316,9 +1316,11 @@ void rb_copy_wb_protected_attribute(VALUE dest, VALUE obj);
#define ruby_sized_xfree(ptr, size) ruby_xfree(ptr)
#define SIZED_REALLOC_N(var,type,n,old_n) REALLOC_N(var, type, n)
#else
+RUBY_SYMBOL_EXPORT_BEGIN
void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_ALLOC_SIZE((2));
void *ruby_sized_xrealloc2(void *ptr, size_t new_count, size_t element_size, size_t old_count) RUBY_ATTR_ALLOC_SIZE((2, 3));
void ruby_sized_xfree(void *x, size_t size);
+RUBY_SYMBOL_EXPORT_END
#define SIZED_REALLOC_N(var,type,n,old_n) ((var)=(type*)ruby_sized_xrealloc((char*)(var), (n) * sizeof(type), (old_n) * sizeof(type)))
#endif