mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* pack.c (define_swapx): should not use plain malloc.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@10545 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f2cfba1410
commit
fd3690d34b
2 changed files with 6 additions and 2 deletions
|
|
@ -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.
|
||||
|
|
|
|||
4
pack.c
4
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]; \
|
||||
} \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue