1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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
This commit is contained in:
usa 2012-12-20 07:43:54 +00:00
parent b9bd8eaf3b
commit 94f42d6d79
2 changed files with 14 additions and 1 deletions

View file

@ -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

8
gc.c
View file

@ -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)