зеркало из https://github.com/github/ruby.git
* include/ruby/ruby.h (PRI[diouxX]VALUE): printf format for VALUE.
* gc.c (assign_heap_slot): suppress a warning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16487 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
d457fdad2d
Коммит
0343750b62
|
@ -1,3 +1,9 @@
|
|||
Tue May 20 11:36:06 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* include/ruby/ruby.h (PRI[diouxX]VALUE): printf format for VALUE.
|
||||
|
||||
* gc.c (assign_heap_slot): suppress a warning.
|
||||
|
||||
Tue May 20 03:42:43 2008 Koichi Sasada <ko1@atdot.net>
|
||||
|
||||
* eval.c, vm_insnhelper.c: fix cref in instance_eval
|
||||
|
|
2
gc.c
2
gc.c
|
@ -570,7 +570,7 @@ assign_heap_slot(rb_objspace_t *objspace)
|
|||
hi = mid;
|
||||
}
|
||||
else {
|
||||
rb_bug("same heap slot is allocated: %p at %ld", membase, mid);
|
||||
rb_bug("same heap slot is allocated: %p at %"PRIuVALUE, membase, (VALUE)mid);
|
||||
}
|
||||
}
|
||||
if (hi < heaps_used) {
|
||||
|
|
|
@ -85,12 +85,24 @@ typedef unsigned long VALUE;
|
|||
typedef unsigned long ID;
|
||||
# define SIGNED_VALUE long
|
||||
# define SIZEOF_VALUE SIZEOF_LONG
|
||||
# define PRIdVALUE "ld"
|
||||
# define PRIiVALUE "li"
|
||||
# define PRIoVALUE "lo"
|
||||
# define PRIuVALUE "lu"
|
||||
# define PRIxVALUE "lx"
|
||||
# define PRIXVALUE "lX"
|
||||
#elif SIZEOF_LONG_LONG == SIZEOF_VOIDP
|
||||
typedef unsigned LONG_LONG VALUE;
|
||||
typedef unsigned LONG_LONG ID;
|
||||
# define SIGNED_VALUE LONG_LONG
|
||||
# define LONG_LONG_VALUE 1
|
||||
# define SIZEOF_VALUE SIZEOF_LONG_LONG
|
||||
# define PRIdVALUE "lld"
|
||||
# define PRIiVALUE "lli"
|
||||
# define PRIoVALUE "llo"
|
||||
# define PRIuVALUE "llu"
|
||||
# define PRIxVALUE "llx"
|
||||
# define PRIXVALUE "llX"
|
||||
#else
|
||||
# error ---->> ruby requires sizeof(void*) == sizeof(long) to be compiled. <<----
|
||||
#endif
|
||||
|
|
Загрузка…
Ссылка в новой задаче