mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* gc.c (ruby_get_stack_grow_direction): no needs to use thread
here, and not initialized yet. [ruby-core:22439] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22659 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
12331d4939
commit
be7679308b
3 changed files with 9 additions and 4 deletions
|
@ -1,3 +1,8 @@
|
|||
Fri Feb 27 18:01:20 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* gc.c (ruby_get_stack_grow_direction): no needs to use thread
|
||||
here, and not initialized yet. [ruby-core:22439]
|
||||
|
||||
Fri Feb 27 17:45:25 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* file.c (file_load_ok): checks if regular file, except for the
|
||||
|
|
6
gc.c
6
gc.c
|
@ -1102,10 +1102,10 @@ int ruby_stack_grow_direction;
|
|||
int
|
||||
ruby_get_stack_grow_direction(VALUE *addr)
|
||||
{
|
||||
rb_thread_t *th = GET_THREAD();
|
||||
SET_STACK_END;
|
||||
VALUE *end;
|
||||
SET_MACHINE_STACK_END(&end);
|
||||
|
||||
if (STACK_END > addr) return ruby_stack_grow_direction = 1;
|
||||
if (end > addr) return ruby_stack_grow_direction = 1;
|
||||
return ruby_stack_grow_direction = -1;
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -275,7 +275,7 @@ ruby_init_stack(VALUE *addr
|
|||
native_main_thread.stack_start = STACK_END_ADDRESS;
|
||||
#else
|
||||
if (!native_main_thread.stack_start ||
|
||||
STACK_UPPER(&addr,
|
||||
STACK_UPPER((VALUE *)(void *)&addr,
|
||||
native_main_thread.stack_start > addr,
|
||||
native_main_thread.stack_start < addr)) {
|
||||
native_main_thread.stack_start = addr;
|
||||
|
|
Loading…
Reference in a new issue