diff options
-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; } |