summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-03 10:52:14 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2015-01-03 10:52:14 (GMT)
commite396ba84fb098812e52c6da9042e46b1ec17a82b (patch)
tree628dc19aec51ce0ae0eb9cbfa8c2486d2d918fe7 /include
parent7a6934f3a8427df546ed05c80e502fa7ab69701b (diff)
intern.h: rb_str_new_literal
* include/ruby/intern.h (rb_str_new_literal): define on all platforms, not only gcc. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/intern.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 00474a7..bf78faa 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -832,10 +832,6 @@ VALUE rb_str_scrub(VALUE, VALUE);
rb_utf8_str_new_static((str), (long)strlen(str)) : \
rb_utf8_str_new_cstr(str); \
})
-#define rb_str_new_literal(str) rb_str_new_static((str), sizeof(str)-1)
-#define rb_usascii_str_new_literal(str) rb_usascii_str_new_static((str), sizeof(str)-1)
-#define rb_utf8_str_new_literal(str) rb_utf8_str_new_static((str), sizeof(str)-1)
-#define rb_enc_str_new_literal(str, enc) rb_enc_str_new_static((str), sizeof(str)-1, (enc))
#define rb_external_str_new_cstr(str) __extension__ ( \
{ \
(__builtin_constant_p(str)) ? \
@@ -878,6 +874,11 @@ VALUE rb_str_scrub(VALUE, VALUE);
#define rb_str_buf_cat rb_str_cat
#define rb_str_buf_cat2 rb_str_cat_cstr
#define rb_str_cat2 rb_str_cat_cstr
+#define rb_str_new_literal(str) rb_str_new_static((str), sizeof(str)-1)
+#define rb_usascii_str_new_literal(str) rb_usascii_str_new_static((str), sizeof(str)-1)
+#define rb_utf8_str_new_literal(str) rb_utf8_str_new_static((str), sizeof(str)-1)
+#define rb_enc_str_new_literal(str, enc) rb_enc_str_new_static((str), sizeof(str)-1, (enc))
+
/* struct.c */
VALUE rb_struct_new(VALUE, ...);
VALUE rb_struct_define(const char*, ...);