зеркало из https://github.com/github/ruby.git
* gc.c (gc_mark_children): should NOT treat last element of
structs and arrays specially. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1809 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
a8c4400d1a
Коммит
a313c30d9c
|
@ -1,3 +1,8 @@
|
|||
Thu Nov 1 13:23:50 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* gc.c (gc_mark_children): should NOT treat last element of
|
||||
structs and arrays specially.
|
||||
|
||||
Wed Oct 31 16:59:25 2001 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||
|
||||
* eval.c (exec_under): should initialize ruby_frame->self;
|
||||
|
|
12
gc.c
12
gc.c
|
@ -630,17 +630,13 @@ gc_mark_children(ptr)
|
|||
|
||||
case T_ARRAY:
|
||||
{
|
||||
int i, len = obj->as.array.len - 1;
|
||||
int i, len = obj->as.array.len;
|
||||
VALUE *ptr = obj->as.array.ptr;
|
||||
|
||||
for (i=0; i < len; i++) {
|
||||
PUSH_MARK(*ptr);
|
||||
ptr++;
|
||||
}
|
||||
if (len >= 0) {
|
||||
obj = RANY(*ptr);
|
||||
goto Again;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
@ -698,17 +694,13 @@ gc_mark_children(ptr)
|
|||
|
||||
case T_STRUCT:
|
||||
{
|
||||
int i, len = obj->as.rstruct.len - 1;
|
||||
int i, len = obj->as.rstruct.len;
|
||||
VALUE *ptr = obj->as.rstruct.ptr;
|
||||
|
||||
for (i=0; i < len; i++) {
|
||||
PUSH_MARK(*ptr);
|
||||
ptr++;
|
||||
}
|
||||
if (len >= 0) {
|
||||
obj = RANY(ptr);
|
||||
goto Again;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче