diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-17 13:59:09 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2006-07-17 13:59:09 +0000 |
commit | 13556ea5ee72c4d0fd94693ebf58d3bcde8d59f7 (patch) | |
tree | b8fe5723cc3fa40e3c0390d3aef8f4b2396c67b4 /pack.c | |
parent | 0227035dd379c4345084fe3fccb1925147549a9e (diff) | |
download | ruby-13556ea5ee72c4d0fd94693ebf58d3bcde8d59f7.tar.gz |
* ext/io/wait/wait.c (io_ready_p): protoize.
* pack.c (define_swapx): should not use plain malloc.
* ext/curses/curses.c (curses_getmouse): ditto.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'pack.c')
-rw-r--r-- | pack.c | 7 |
1 files changed, 3 insertions, 4 deletions
@@ -52,18 +52,17 @@ #define define_swapx(x, xtype) \ static xtype \ -TOKEN_PASTE(swap,x)(z) \ - xtype z; \ +TOKEN_PASTE(swap,x)(xtype z) \ { \ xtype r; \ xtype *zp; \ 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]; \ } \ |