diff options
| author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-07 14:04:30 +0000 |
|---|---|---|
| committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2005-01-07 14:04:30 +0000 |
| commit | c1aed0cece671850f7dc4d91c7b93d1e92c9e58b (patch) | |
| tree | f8455690d1806d02223c212cacda0121a911dd18 | |
| parent | 76b47f71172edcb85452580ef0243420c9e63de0 (diff) | |
| download | ruby-c1aed0cece671850f7dc4d91c7b93d1e92c9e58b.tar.gz ruby-c1aed0cece671850f7dc4d91c7b93d1e92c9e58b.tar.xz ruby-c1aed0cece671850f7dc4d91c7b93d1e92c9e58b.zip | |
* random.c (rand_init): use ALLOC_N instead of ALLOCA_N
by TAMURA Takashi.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
| -rw-r--r-- | ChangeLog | 4 | ||||
| -rw-r--r-- | random.c | 4 |
2 files changed, 6 insertions, 2 deletions
@@ -1,3 +1,7 @@ +Fri Jan 7 21:12:29 2005 TAMURA Takashi <sheepman@tcn.zaq.ne.jp> + + * random.c (rand_init): use ALLOC_N instead of ALLOCA_N + Fri Jan 7 20:01:31 2005 GOTOU Yuuzou <gotoyuzo@notwork.org> * lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_service): @@ -216,7 +216,7 @@ rand_init(vseed) rb_obj_classname(vseed)); } len = (len + 3) / 4; /* number of 32bit words */ - buf = ALLOCA_N(long, len); /* allocate longs for init_by_array */ + buf = ALLOC_N(long, len); /* allocate longs for init_by_array */ memset(buf, 0, len * sizeof(long)); if (FIXNUM_P(seed)) { buf[0] = FIX2ULONG(seed) & 0xffffffff; @@ -248,7 +248,7 @@ rand_init(vseed) first = 0; old = saved_seed; saved_seed = seed; - + free(buf); return old; } |
