[前][次][番号順一覧][スレッド一覧]

ruby-changes:33526

From: nobu <ko1@a...>
Date: Thu, 17 Apr 2014 11:41:50 +0900 (JST)
Subject: [ruby-changes:33526] nobu:r45607 (trunk): string.c: alias of rb_str_buf_cat and rb_str_buf_cat2

nobu	2014-04-17 11:41:36 +0900 (Thu, 17 Apr 2014)

  New Revision: 45607

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=45607

  Log:
    string.c: alias of rb_str_buf_cat and rb_str_buf_cat2
    
    * string.c (rb_str_cat, rb_str_cat2): make aliases of
      rb_str_buf_cat and rb_str_buf_cat2 respectively.

  Modified files:
    trunk/string.c
Index: string.c
===================================================================
--- string.c	(revision 45606)
+++ string.c	(revision 45607)
@@ -2063,17 +2063,8 @@ rb_str_buf_cat2(VALUE str, const char *p https://github.com/ruby/ruby/blob/trunk/string.c#L2063
     return rb_str_buf_cat(str, ptr, strlen(ptr));
 }
 
-VALUE
-rb_str_cat(VALUE str, const char *ptr, long len)
-{
-    return rb_str_buf_cat(str, ptr, len);
-}
-
-VALUE
-rb_str_cat2(VALUE str, const char *ptr)
-{
-    return rb_str_buf_cat2(str, ptr);
-}
+RUBY_ALIAS_FUNCTION(rb_str_cat(VALUE str, const char *ptr, long len), rb_str_buf_cat, (str, ptr, len))
+RUBY_ALIAS_FUNCTION(rb_str_cat2(VALUE str, const char *ptr), rb_str_buf_cat2, (str, ptr))
 
 static VALUE
 rb_enc_cr_str_buf_cat(VALUE str, const char *ptr, long len,

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]