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

ruby-changes:4130

From: ko1@a...
Date: Thu, 28 Feb 2008 11:14:09 +0900 (JST)
Subject: [ruby-changes:4130] nobu - Ruby:r15620 (trunk): * include/ruby/encoding.h (rb_str_coderange_scan_restartable): added

nobu	2008-02-28 11:13:51 +0900 (Thu, 28 Feb 2008)

  New Revision: 15620

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

  Log:
    * include/ruby/encoding.h (rb_str_coderange_scan_restartable): added
      prototype.
    
    * string.c (rb_str_coderange_scan_restartable, rb_str_times): removed
      unsed variables.
    
    * string.c (rb_enc_str_copy): unused now.  may be used in future?


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

Index: include/ruby/encoding.h
===================================================================
--- include/ruby/encoding.h	(revision 15619)
+++ include/ruby/encoding.h	(revision 15620)
@@ -163,6 +163,7 @@
 ID rb_interned_id_p(const char *, long, rb_encoding *);
 int rb_enc_symname_p(const char*, rb_encoding*);
 int rb_enc_str_coderange(VALUE);
+long rb_str_coderange_scan_restartable(const char*, const char*, rb_encoding*, int*);
 int rb_enc_str_asciionly_p(VALUE);
 #define rb_enc_str_asciicompat_p(str) rb_enc_asciicompat(rb_enc_get(str))
 VALUE rb_enc_from_encoding(rb_encoding *enc);
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 15619)
+++ ChangeLog	(revision 15620)
@@ -1,3 +1,13 @@
+Thu Feb 28 11:13:48 2008  Nobuyoshi Nakada  <nobu@r...>
+
+	* include/ruby/encoding.h (rb_str_coderange_scan_restartable): added
+	  prototype.
+
+	* string.c (rb_str_coderange_scan_restartable, rb_str_times): removed
+	  unsed variables.
+
+	* string.c (rb_enc_str_copy): unused now.  may be used in future?
+
 Thu Feb 28 03:03:32 2008  Hidetoshi NAGAI  <nagai@a...>
 
 	* ext/tk/lib/tk.rb, ext/tk/lib/*: make default widget set 
Index: string.c
===================================================================
--- string.c	(revision 15619)
+++ string.c	(revision 15620)
@@ -204,10 +204,7 @@
 long
 rb_str_coderange_scan_restartable(const char *s, const char *e, rb_encoding *enc, int *cr)
 {
-    long c;
-    const char *p;
-    int ret;
-    p = s;
+    const char *p = s;
 
     if (*cr == ENC_CODERANGE_BROKEN)
 	return e - s;
@@ -256,6 +253,7 @@
     }
 }
 
+#if 0
 static void
 rb_enc_str_copy(VALUE dest, VALUE src)
 {
@@ -265,6 +263,7 @@
 	ENC_CODERANGE_SET(dest, ENC_CODERANGE(src));
     }
 }
+#endif
 
 static void
 rb_enc_cr_str_copy_for_substr(VALUE dest, VALUE src)
@@ -274,17 +273,17 @@
      */
     rb_enc_copy(dest, src);
     switch (ENC_CODERANGE(src)) {
-    case ENC_CODERANGE_7BIT:
+      case ENC_CODERANGE_7BIT:
 	ENC_CODERANGE_SET(dest, ENC_CODERANGE_7BIT);
 	break;
-    case ENC_CODERANGE_VALID:
+      case ENC_CODERANGE_VALID:
 	if (!rb_enc_asciicompat(STR_ENC_GET(src)) ||
 	    search_nonascii(RSTRING_PTR(dest), RSTRING_END(dest)))
 	    ENC_CODERANGE_SET(dest, ENC_CODERANGE_VALID);
 	else
 	    ENC_CODERANGE_SET(dest, ENC_CODERANGE_7BIT);
 	break;
-    default:
+      default:
 	if (RSTRING_LEN(dest) == 0) {
 	    if (!rb_enc_asciicompat(STR_ENC_GET(src)))
 		ENC_CODERANGE_SET(dest, ENC_CODERANGE_VALID);
@@ -315,7 +314,8 @@
     return cr;
 }
 
-int rb_enc_str_asciionly_p(VALUE str)
+int
+rb_enc_str_asciionly_p(VALUE str)
 {
     rb_encoding *enc = STR_ENC_GET(str);
 
@@ -914,7 +914,6 @@
 {
     VALUE str2;
     long n, len;
-    int cr;
 
     len = NUM2LONG(times);
     if (len < 0) {
Index: version.h
===================================================================
--- version.h	(revision 15619)
+++ version.h	(revision 15620)
@@ -9,7 +9,7 @@
 #define RUBY_VERSION_TEENY 0
 #define RUBY_RELEASE_YEAR 2008
 #define RUBY_RELEASE_MONTH 2
-#define RUBY_RELEASE_DAY 27
+#define RUBY_RELEASE_DAY 28
 
 #ifdef RUBY_EXTERN
 RUBY_EXTERN const char ruby_version[];

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

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