summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--pack.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index cbdc2ba..d5dc160 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+Mon Jul 17 13:43:05 2006 Yukihiro Matsumoto <matz@ruby-lang.org>
+
+ * pack.c (define_swapx): should not use plain malloc.
+
Mon Jul 17 12:58:41 2006 WATANABE Hirofumi <eban@ruby-lang.org>
* configure.in: should use ac_cv_lib_dl_dlopen=no on MinGW.
diff --git a/pack.c b/pack.c
index efd69c9..d031f59 100644
--- a/pack.c
+++ b/pack.c
@@ -60,10 +60,10 @@ TOKEN_PASTE(swap,x)(z) \
unsigned char *s, *t; \
int i; \
\
- zp = malloc(sizeof(xtype)); \
+ zp = xmalloc(sizeof(xtype)); \
*zp = z; \
s = (unsigned char*)zp; \
- t = malloc(sizeof(xtype)); \
+ t = xmalloc(sizeof(xtype)); \
for (i=0; i<sizeof(xtype); i++) { \
t[sizeof(xtype)-i-1] = s[i]; \
} \