mirror of
https://github.com/ruby/ruby.git
synced 2025-09-21 11:33:58 +02:00
* include/ruby/ruby.h (VALUE): use unsigned long or long long
instead of uintptr_t, since many %lx and so on are still used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21605 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
f53ead0d4e
commit
99e9aca096
1 changed files with 6 additions and 3 deletions
|
@ -80,12 +80,12 @@ extern "C" {
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined HAVE_UINTPTR_T
|
#if defined HAVE_UINTPTR_T && 0
|
||||||
typedef uintptr_t VALUE;
|
typedef uintptr_t VALUE;
|
||||||
typedef uintptr_t ID;
|
typedef uintptr_t ID;
|
||||||
# define SIGNED_VALUE intptr_t
|
# define SIGNED_VALUE intptr_t
|
||||||
# define SIZEOF_VALUE SIZEOF_UINTPTR_T
|
# define SIZEOF_VALUE SIZEOF_UINTPTR_T
|
||||||
# define PRI_VALUE_PREFIX ""
|
# undef PRI_VALUE_PREFIX
|
||||||
#elif SIZEOF_LONG == SIZEOF_VOIDP
|
#elif SIZEOF_LONG == SIZEOF_VOIDP
|
||||||
typedef unsigned long VALUE;
|
typedef unsigned long VALUE;
|
||||||
typedef unsigned long ID;
|
typedef unsigned long ID;
|
||||||
|
@ -103,7 +103,7 @@ typedef unsigned LONG_LONG ID;
|
||||||
# error ---->> ruby requires sizeof(void*) == sizeof(long) to be compiled. <<----
|
# error ---->> ruby requires sizeof(void*) == sizeof(long) to be compiled. <<----
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef PRIdPTR
|
#if defined PRIdPTR && !defined PRI_VALUE_PREFIX
|
||||||
#define PRIdVALUE PRIdPTR
|
#define PRIdVALUE PRIdPTR
|
||||||
#define PRIiVALUE PRIiPTR
|
#define PRIiVALUE PRIiPTR
|
||||||
#define PRIoVALUE PRIoPTR
|
#define PRIoVALUE PRIoPTR
|
||||||
|
@ -118,6 +118,9 @@ typedef unsigned LONG_LONG ID;
|
||||||
#define PRIxVALUE PRI_VALUE_PREFIX"x"
|
#define PRIxVALUE PRI_VALUE_PREFIX"x"
|
||||||
#define PRIXVALUE PRI_VALUE_PREFIX"X"
|
#define PRIXVALUE PRI_VALUE_PREFIX"X"
|
||||||
#endif
|
#endif
|
||||||
|
#ifndef PRI_VALUE_PREFIX
|
||||||
|
# define PRI_VALUE_PREFIX ""
|
||||||
|
#endif
|
||||||
|
|
||||||
#if defined PRIdPTR
|
#if defined PRIdPTR
|
||||||
# define PRI_PTRDIFF_PREFIX "t"
|
# define PRI_PTRDIFF_PREFIX "t"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue