summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-17 05:22:57 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-04-17 05:22:57 +0000
commit37dffb599de6ad056c686f41881e9967dee4418e (patch)
tree1861c6ed6f8c594d0aa1916c1798efa06a67e249 /include
parent3d69324be300fce437536f7b7ac5f3d5c8c54d7d (diff)
string.c: rb_str_cat_cstr
* string.c (rb_str_cat): make non-buf version main. * string.c (rb_str_cat_cstr): rename from rb_str_cat2. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include')
-rw-r--r--include/ruby/intern.h14
1 files changed, 6 insertions, 8 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 26b880e..c69d378 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -727,6 +727,7 @@ VALUE rb_str_freeze(VALUE);
void rb_str_set_len(VALUE, long);
VALUE rb_str_resize(VALUE, long);
VALUE rb_str_cat(VALUE, const char*, long);
+VALUE rb_str_cat_cstr(VALUE, const char*);
VALUE rb_str_cat2(VALUE, const char*);
VALUE rb_str_append(VALUE, VALUE);
VALUE rb_str_concat(VALUE, VALUE);
@@ -798,17 +799,11 @@ VALUE rb_str_scrub(VALUE, VALUE);
(str), (long)strlen(str)) : \
rb_str_buf_new_cstr(str); \
})
-#define rb_str_buf_cat2(str, ptr) __extension__ ( \
-{ \
- (__builtin_constant_p(ptr)) ? \
- rb_str_buf_cat((str), (ptr), (long)strlen(ptr)) : \
- rb_str_buf_cat2((str), (ptr)); \
-})
-#define rb_str_cat2(str, ptr) __extension__ ( \
+#define rb_str_cat_cstr(str, ptr) __extension__ ( \
{ \
(__builtin_constant_p(ptr)) ? \
rb_str_cat((str), (ptr), (long)strlen(ptr)) : \
- rb_str_cat2((str), (ptr)); \
+ rb_str_cat_cstr((str), (ptr)); \
})
#define rb_exc_new_cstr(klass, ptr) __extension__ ( \
{ \
@@ -824,6 +819,9 @@ VALUE rb_str_scrub(VALUE, VALUE);
#define rb_tainted_str_new2 rb_tainted_str_new_cstr
#define rb_str_buf_new2 rb_str_buf_new_cstr
#define rb_usascii_str_new2 rb_usascii_str_new_cstr
+#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
/* struct.c */
VALUE rb_struct_new(VALUE, ...);
VALUE rb_struct_define(const char*, ...);