summaryrefslogtreecommitdiff
path: root/include/ruby/ruby.h
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-04 03:51:33 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-11-04 03:51:33 +0000
commita9f3eb75de7c4041b273cc782585e1b7b20a6fa4 (patch)
treebc3e0feff04abf0f51714a7300755890986e5e78 /include/ruby/ruby.h
parent95e83cb3f940cc1a8ab7681ad01f67aba77554a0 (diff)
ruby.h: add mark to PRIsVALUE
* include/ruby/ruby.h (PRIsVALUE), vsnprintf.c (BSD_vfprintf): add RUBY_PRI_VALUE_MARK to reduce danger of accidental conflict with plain "%i". binary incompatible with extension libraries using PRIsVALUE and built for 2.1 and earlier. [EXPERIMENTAL] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48262 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby/ruby.h')
-rw-r--r--include/ruby/ruby.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 2b175fd..18183f7 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -123,20 +123,21 @@ typedef char ruby_check_sizeof_voidp[SIZEOF_VOIDP == sizeof(void*) ? 1 : -1];
#define PRI_64_PREFIX PRI_LL_PREFIX
#endif
+#define RUBY_PRI_VALUE_MARK "\v"
#if defined PRIdPTR && !defined PRI_VALUE_PREFIX
#define PRIdVALUE PRIdPTR
#define PRIoVALUE PRIoPTR
#define PRIuVALUE PRIuPTR
#define PRIxVALUE PRIxPTR
#define PRIXVALUE PRIXPTR
-#define PRIsVALUE PRIiPTR
+#define PRIsVALUE PRIiPTR""RUBY_PRI_VALUE_MARK
#else
#define PRIdVALUE PRI_VALUE_PREFIX"d"
#define PRIoVALUE PRI_VALUE_PREFIX"o"
#define PRIuVALUE PRI_VALUE_PREFIX"u"
#define PRIxVALUE PRI_VALUE_PREFIX"x"
#define PRIXVALUE PRI_VALUE_PREFIX"X"
-#define PRIsVALUE PRI_VALUE_PREFIX"i"
+#define PRIsVALUE PRI_VALUE_PREFIX"i"RUBY_PRI_VALUE_MARK
#endif
#ifndef PRI_VALUE_PREFIX
# define PRI_VALUE_PREFIX ""