aboutsummaryrefslogtreecommitdiffstats
path: root/ruby.h
diff options
context:
space:
mode:
Diffstat (limited to 'ruby.h')
-rw-r--r--ruby.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/ruby.h b/ruby.h
index 5eb52c5bfa..52e9fdd28c 100644
--- a/ruby.h
+++ b/ruby.h
@@ -479,9 +479,9 @@ struct RBignum {
#define OBJ_FROZEN(x) FL_TEST((x), FL_FREEZE)
#define OBJ_FREEZE(x) FL_SET((x), FL_FREEZE)
-#define ALLOC_N(type,n) (type*)xmalloc(sizeof(type)*(n))
+#define ALLOC_N(type,n) (type*)xmalloc2((n),sizeof(type))
#define ALLOC(type) (type*)xmalloc(sizeof(type))
-#define REALLOC_N(var,type,n) (var)=(type*)xrealloc((char*)(var),sizeof(type)*(n))
+#define REALLOC_N(var,type,n) (var)=(type*)xrealloc2((char*)(var),(n),sizeof(type))
#define ALLOCA_N(type,n) (type*)alloca(sizeof(type)*(n))