summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-19 02:01:15 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-09-19 02:01:15 +0000
commit431dc5c8b531f4ab67d70ea899f9837d2b10e840 (patch)
tree9a12c3a3c913001b9047eabcfe55da82f572c37a /include
parent5cd2d58396dbccda7b4187d60063bdc234acd861 (diff)
ruby.h: err rb_check_safe_str explicitly
* include/ruby/ruby.h (rb_check_safe_str, Check_SafeStr): show error message to update for obsolete function and macro. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47636 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index f6dfd97..3d6e45b 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -531,6 +531,13 @@ void rb_check_safe_obj(VALUE);
StringValue(v);\
rb_check_safe_obj(v);\
} while (0)
+#if defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 4))
+void rb_check_safe_str(VALUE) __attribute__((error("rb_check_safe_str() and Check_SafeStr() are obsolete; use SafeStringValue() instead")));
+# define Check_SafeStr(v) rb_check_safe_str((VALUE)(v))
+#else
+# define rb_check_safe_str(x) [<"rb_check_safe_str() is obsolete; use SafeStringValue() instead">]
+# define Check_SafeStr(v) [<"Check_SafeStr() is obsolete; use SafeStringValue() instead">]
+#endif
VALUE rb_str_export(VALUE);
#define ExportStringValue(v) do {\