diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-20 07:43:54 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-12-20 07:43:54 +0000 |
commit | 94f42d6d79717c19f20e33ca4a29ce206d79f74e (patch) | |
tree | c2fc735d718bfd570c8f4e361ac2979817822838 | |
parent | b9bd8eaf3b973268b898df22ee4cdadca7d15730 (diff) | |
download | ruby-94f42d6d79717c19f20e33ca4a29ce206d79f74e.tar.gz |
* gc.c (nonspecial_obj_id): VALUE is not compatible with Fixnum on
LLP64 platform, such as 64bit Windows.
reporeted by Heesob Park at [ruby-core:50255] [Bug #7454], and the
fix is suggested by akr.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@38493 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | gc.c | 8 |
2 files changed, 14 insertions, 1 deletions
@@ -1,3 +1,10 @@ +Thu Dec 20 16:40:13 2012 NAKAMURA Usaku <usa@ruby-lang.org> + + * gc.c (nonspecial_obj_id): VALUE is not compatible with Fixnum on + LLP64 platform, such as 64bit Windows. + reporeted by Heesob Park at [ruby-core:50255] [Bug #7454], and the + fix is suggested by akr. + Thu Dec 20 16:39:04 2012 Martin Bosslet <Martin.Bosslet@gmail.com> * ext/openssl/ossl_cipher.c: fix errors for installations that do not @@ -290,7 +290,13 @@ int *ruby_initial_gc_stress_ptr = &rb_objspace.gc_stress; #define is_lazy_sweeping(objspace) ((objspace)->heap.sweep_slots != 0) -#define nonspecial_obj_id(obj) (VALUE)((SIGNED_VALUE)(obj)|FIXNUM_FLAG) +#if SIZEOF_LONG == SIZEOF_VOIDP +# define nonspecial_obj_id(obj) (VALUE)((SIGNED_VALUE)(obj)|FIXNUM_FLAG) +#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP +# define nonspecial_obj_id(obj) LL2NUM((SIGNED_VALUE)(obj) / 2) +#else +# error not supported +#endif #define RANY(o) ((RVALUE*)(o)) #define has_free_object (objspace->heap.free_slots && objspace->heap.free_slots->freelist) |