From e6bb432c83584f174d9ccc24f6433a781aa9364d Mon Sep 17 00:00:00 2001 From: nobu Date: Thu, 3 Oct 2002 11:24:24 +0000 Subject: [PATCH] * gc.c (Init_stack): prefer address of argument rather than local variable to initialize rb_gc_stack_start. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2930 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 5 ++++- gc.c | 4 +--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/ChangeLog b/ChangeLog index 5ec5c4dee6..9850e701fa 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,4 @@ -Thu Oct 3 20:16:12 2002 Nobuyoshi Nakada +Thu Oct 3 20:22:11 2002 Nobuyoshi Nakada * bcc32/mkexports.rb: to work on cygwin via telnet. [ruby-win32:358] @@ -16,6 +16,9 @@ Thu Oct 3 20:16:12 2002 Nobuyoshi Nakada * eval.c (rb_f_require): set source file name for extension libraries. [ruby-dev:18445] + * gc.c (Init_stack): prefer address of argument rather than local + variable to initialize rb_gc_stack_start. + * ruby.c (translate_char): translate a character in a string; DOSISH only. [ruby-dev:18274] diff --git a/gc.c b/gc.c index 72cbfb626e..7d46110543 100644 --- a/gc.c +++ b/gc.c @@ -1225,9 +1225,7 @@ Init_stack(addr) extern void *_SEND; rb_gc_stack_start = _SEND; #else - VALUE start; - - if (!addr) addr = &start; + if (!addr) addr = (VALUE *)&addr; rb_gc_stack_start = addr; #endif #ifdef HAVE_GETRLIMIT