summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-20 02:36:09 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-05-20 02:36:09 +0000
commit0343750b62b11edfee151cf22675c10f19742db3 (patch)
tree10fd3878cd54897d77412459c0efdc08d5dc02a3 /include
parentd457fdad2dbcba31eee20f491deae3120db11dec (diff)
* 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
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h12
1 files changed, 12 insertions, 0 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 0d146fbbce..a7afc51494 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -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