diff options
Diffstat (limited to 'internal.h')
-rw-r--r-- | internal.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/internal.h b/internal.h index 9b8000d136..51e626a493 100644 --- a/internal.h +++ b/internal.h @@ -461,10 +461,12 @@ void ruby_gc_set_params(int safe_level); #if defined(HAVE_MALLOC_USABLE_SIZE) || defined(HAVE_MALLOC_SIZE) || defined(_WIN32) #define ruby_sized_xrealloc(ptr, new_size, old_size) ruby_xrealloc(ptr, new_size) +#define ruby_sized_xrealloc2(ptr, new_count, element_size, old_count) ruby_xrealloc(ptr, new_count, element_size) #define ruby_sized_xfree(ptr, size) ruby_xfree(ptr) #define SIZED_REALLOC_N(var,type,n,old_n) REALLOC_N(var, type, n) #else void *ruby_sized_xrealloc(void *ptr, size_t new_size, size_t old_size) RUBY_ATTR_ALLOC_SIZE((2)); +void *ruby_sized_xrealloc(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); #define SIZED_REALLOC_N(var,type,n,old_n) ((var)=(type*)ruby_sized_xrealloc((char*)(var), (n) * sizeof(type), (old_n) * sizeof(type))) #endif |