From ea06d92507abd09c03ad79c77c8a2edc86f5cce6 Mon Sep 17 00:00:00 2001 From: akr Date: Fri, 7 Jan 2005 14:04:30 +0000 Subject: [PATCH] * random.c (rand_init): use ALLOC_N instead of ALLOCA_N by TAMURA Takashi. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7744 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 4 ++++ random.c | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5db22624e1..f80b8f34eb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,7 @@ +Fri Jan 7 21:12:29 2005 TAMURA Takashi + + * random.c (rand_init): use ALLOC_N instead of ALLOCA_N + Fri Jan 7 20:01:31 2005 GOTOU Yuuzou * lib/webrick/httpproxy.rb (WEBrick::HTTPProxyServer#proxy_service): diff --git a/random.c b/random.c index 6a4ed2d286..658cce4b92 100644 --- a/random.c +++ b/random.c @@ -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; }