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

ruby-changes:5006

From: ko1@a...
Date: Wed, 21 May 2008 07:26:37 +0900 (JST)
Subject: [ruby-changes:5006] naruse - Ruby:r16499 (trunk): * encoding.c, include/ruby/encoding.h

naruse	2008-05-21 07:26:14 +0900 (Wed, 21 May 2008)

  New Revision: 16499

  Modified files:
    trunk/ChangeLog
    trunk/encoding.c
    trunk/include/ruby/encoding.h

  Log:
    * encoding.c, include/ruby/encoding.h
      (rb_enc_associate, rb_enc_associate_index):
      returns obj. [ruby-dev:34778]

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=16499&r2=16498&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/include/ruby/encoding.h?r1=16499&r2=16498&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/encoding.c?r1=16499&r2=16498&diff_format=u

Index: encoding.c
===================================================================
--- encoding.c	(revision 16498)
+++ encoding.c	(revision 16499)
@@ -564,10 +564,10 @@
     return;
 }
 
-void
+VALUE
 rb_enc_associate_index(VALUE obj, int idx)
 {
-//    enc_check_capable(obj);
+/*    enc_check_capable(obj);*/
     if (rb_enc_get_index(obj) == idx)
     	return;
     if (!ENC_CODERANGE_ASCIIONLY(obj) ||
@@ -575,12 +575,13 @@
 	ENC_CODERANGE_CLEAR(obj);
     }
     rb_enc_set_index(obj, idx);
+    return obj;
 }
 
-void
+VALUE
 rb_enc_associate(VALUE obj, rb_encoding *enc)
 {
-    rb_enc_associate_index(obj, rb_enc_to_index(enc));
+    return rb_enc_associate_index(obj, rb_enc_to_index(enc));
 }
 
 rb_encoding*
Index: include/ruby/encoding.h
===================================================================
--- include/ruby/encoding.h	(revision 16498)
+++ include/ruby/encoding.h	(revision 16499)
@@ -83,8 +83,8 @@
 rb_encoding* rb_enc_get(VALUE);
 rb_encoding* rb_enc_compatible(VALUE,VALUE);
 rb_encoding* rb_enc_check(VALUE,VALUE);
-void rb_enc_associate_index(VALUE, int);
-void rb_enc_associate(VALUE, rb_encoding*);
+VALUE rb_enc_associate_index(VALUE, int);
+VALUE rb_enc_associate(VALUE, rb_encoding*);
 void rb_enc_copy(VALUE dst, VALUE src);
 
 VALUE rb_enc_str_new(const char*, long, rb_encoding*);
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 16498)
+++ ChangeLog	(revision 16499)
@@ -1,3 +1,9 @@
+Wed May 21 07:22:01 2008  NARUSE, Yui  <naruse@r...>
+
+	* encoding.c, include/ruby/encoding.h
+	  (rb_enc_associate, rb_enc_associate_index):
+	  returns obj. [ruby-dev:34778]
+
 Wed May 21 04:20:20 2008  NARUSE, Yui  <naruse@r...>
 
 	* encoding.c (rb_ascii8bit_encoding): use ENCINDEX_ASCII.

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

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