зеркало из https://github.com/github/ruby.git
* gc.c (rb_obj_id): use SIGNED_VALUE instead of long.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12645 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
fd58a0836f
Коммит
14010ce4a3
|
@ -1,3 +1,7 @@
|
|||
Thu Jun 28 11:30:39 2007 NAKAMURA Usaku <usa@ruby-lang.org>
|
||||
|
||||
* gc.c (rb_obj_id): use SIGNED_VALUE instead of long.
|
||||
|
||||
Thu Jun 28 05:01:56 2007 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* common.mk (run.gdb): fix to load $(srcdir)/.gdbinit
|
||||
|
|
8
gc.c
8
gc.c
|
@ -2058,7 +2058,7 @@ rb_obj_id(VALUE obj)
|
|||
* nil 00000000000000000000000000000100
|
||||
* undef 00000000000000000000000000000110
|
||||
* symbol ssssssssssssssssssssssss00001110
|
||||
* object oooooooooooooooooooooooooooooo00 = 0 (mod sizeof(RVALUE)
|
||||
* object oooooooooooooooooooooooooooooo00 = 0 (mod sizeof(RVALUE))
|
||||
* fixnum fffffffffffffffffffffffffffffff1
|
||||
*
|
||||
* object_id space
|
||||
|
@ -2067,7 +2067,7 @@ rb_obj_id(VALUE obj)
|
|||
* true 00000000000000000000000000000010
|
||||
* nil 00000000000000000000000000000100
|
||||
* undef 00000000000000000000000000000110
|
||||
* symbol 000SSSSSSSSSSSSSSSSSSSSSSSSSSS0 S...S % A = 4 (S...S =
|
||||
* symbol 000SSSSSSSSSSSSSSSSSSSSSSSSSSS0 S...S % A = 4 (S...S = s...s * A + 4)
|
||||
* object oooooooooooooooooooooooooooooo0 o...o % A = 0
|
||||
* fixnum fffffffffffffffffffffffffffffff1 bignum if required
|
||||
*
|
||||
|
@ -2082,9 +2082,9 @@ rb_obj_id(VALUE obj)
|
|||
return (SYM2ID(obj) * sizeof(RVALUE) + (4 << 2)) | FIXNUM_FLAG;
|
||||
}
|
||||
if (SPECIAL_CONST_P(obj)) {
|
||||
return LONG2NUM((long)obj);
|
||||
return LONG2NUM((SIGNED_VALUE)obj);
|
||||
}
|
||||
return (VALUE)((long)obj|FIXNUM_FLAG);
|
||||
return (VALUE)((SIGNED_VALUE)obj|FIXNUM_FLAG);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Загрузка…
Ссылка в новой задаче