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

ruby-changes:7603

From: akr <ko1@a...>
Date: Thu, 4 Sep 2008 19:22:35 +0900 (JST)
Subject: [ruby-changes:7603] Ruby:r19124 (trunk): * include/ruby/io.h (rb_io_enc_t): rename flags to ecflags.

akr	2008-09-04 19:22:11 +0900 (Thu, 04 Sep 2008)

  New Revision: 19124

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

  Log:
    * include/ruby/io.h (rb_io_enc_t): rename flags to ecflags.
      (rb_io_t): rename writeconv_pre_flags to writeconv_pre_ecflags.
      (MakeOpenFile): follow the renaming.
    
    * io.c: follow the renaming.

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

Index: include/ruby/io.h
===================================================================
--- include/ruby/io.h	(revision 19123)
+++ include/ruby/io.h	(revision 19124)
@@ -57,7 +57,7 @@
     struct rb_io_enc_t {
         rb_encoding *enc;
         rb_encoding *enc2;
-        int flags;
+        int ecflags;
         VALUE ecopts;
     } encs;
 
@@ -69,7 +69,7 @@
 
     rb_econv_t *writeconv;
     VALUE writeconv_stateless;
-    int writeconv_pre_flags;
+    int writeconv_pre_ecflags;
     VALUE writeconv_pre_ecopts;
     int writeconv_initialized;
 
@@ -125,13 +125,13 @@
     fp->cbuf_capa = 0;\
     fp->writeconv = NULL;\
     fp->writeconv_stateless = Qnil;\
-    fp->writeconv_pre_flags = 0;\
+    fp->writeconv_pre_ecflags = 0;\
     fp->writeconv_pre_ecopts = Qnil;\
     fp->writeconv_initialized = 0;\
     fp->tied_io_for_writing = 0;\
     fp->encs.enc = NULL;\
     fp->encs.enc2 = NULL;\
-    fp->encs.flags = 0;\
+    fp->encs.ecflags = 0;\
     fp->encs.ecopts = Qnil;\
 } while (0)
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19123)
+++ ChangeLog	(revision 19124)
@@ -1,3 +1,11 @@
+Thu Sep  4 19:20:24 2008  Tanaka Akira  <akr@f...>
+
+	* include/ruby/io.h (rb_io_enc_t): rename flags to ecflags.
+	  (rb_io_t): rename writeconv_pre_flags to writeconv_pre_ecflags.
+	  (MakeOpenFile): follow the renaming.
+
+	* io.c: follow the renaming.
+
 Thu Sep  4 19:10:27 2008  Tanaka Akira  <akr@f...>
 
 	* include/ruby/encoding.h (ECONV_INVALID_IGNORE): removed because
Index: io.c
===================================================================
--- io.c	(revision 19123)
+++ io.c	(revision 19124)
@@ -697,9 +697,9 @@
 
         /* ECONV_INVALID_XXX and ECONV_UNDEF_XXX should be set both.
          * But ECONV_CRLF_NEWLINE_ENCODER should be set only for the first. */
-        fptr->writeconv_pre_flags = fptr->encs.flags;
+        fptr->writeconv_pre_ecflags = fptr->encs.ecflags;
         fptr->writeconv_pre_ecopts = fptr->encs.ecopts;
-        ecflags = fptr->encs.flags;
+        ecflags = fptr->encs.ecflags;
         ecopts = fptr->encs.ecopts;
 
 #ifdef TEXTMODE_NEWLINE_ENCODER
@@ -714,7 +714,7 @@
         }
 
         if (NEED_NEWLINE_ENCODER(fptr))
-            fptr->writeconv_pre_flags |= TEXTMODE_NEWLINE_ENCODER;
+            fptr->writeconv_pre_ecflags |= TEXTMODE_NEWLINE_ENCODER;
 #endif
 
         enc = fptr->encs.enc2 ? fptr->encs.enc2 : fptr->encs.enc;
@@ -757,7 +757,7 @@
 
         if (!NIL_P(common_encoding)) {
             str = rb_str_transcode(str, common_encoding,
-                fptr->writeconv_pre_flags, fptr->writeconv_pre_ecopts);
+                fptr->writeconv_pre_ecflags, fptr->writeconv_pre_ecopts);
         }
 
         if (fptr->writeconv) {
@@ -1444,7 +1444,7 @@
         int ecflags;
         VALUE ecopts;
         const char *sname, *dname;
-        ecflags = fptr->encs.flags;
+        ecflags = fptr->encs.ecflags;
         ecopts = fptr->encs.ecopts;
         if (NEED_NEWLINE_DECODER(fptr))
             ecflags |= ECONV_UNIVERSAL_NEWLINE_DECODER;
@@ -3906,7 +3906,7 @@
     *flags_p = flags;
     convconfig_p->enc = enc;
     convconfig_p->enc2 = enc2;
-    convconfig_p->flags = ecflags;
+    convconfig_p->ecflags = ecflags;
     convconfig_p->ecopts = ecopts;
 }
 
@@ -4015,7 +4015,7 @@
     else {
         fptr->encs.enc = NULL;
         fptr->encs.enc2 = NULL;
-        fptr->encs.flags = 0;
+        fptr->encs.ecflags = 0;
         fptr->encs.ecopts = Qnil;
     }
     fptr->pathv = rb_str_new_frozen(filename);
@@ -4038,7 +4038,7 @@
     else {
         convconfig.enc = NULL;
         convconfig.enc2 = NULL;
-        convconfig.flags = 0;
+        convconfig.ecflags = 0;
         convconfig.ecopts = Qnil;
     }
 
@@ -5024,7 +5024,7 @@
 	}
 	fptr->mode = flags;
 	rb_io_mode_enc(fptr, StringValueCStr(nmode));
-        fptr->encs.flags = 0;
+        fptr->encs.ecflags = 0;
         fptr->encs.ecopts = Qnil;
     }
 
@@ -6595,14 +6595,14 @@
     if (argc == 2) {
 	fptr->encs.enc2 = rb_to_encoding(v1);
 	fptr->encs.enc = rb_to_encoding(v2);
-        fptr->encs.flags = rb_econv_prepare_opts(opt, &fptr->encs.ecopts);
+        fptr->encs.ecflags = rb_econv_prepare_opts(opt, &fptr->encs.ecopts);
         clear_codeconv(fptr);
     }
     else if (argc == 1) {
 	if (NIL_P(v1)) {
 	    fptr->encs.enc = NULL;
 	    fptr->encs.enc2 = NULL;
-            fptr->encs.flags = 0;
+            fptr->encs.ecflags = 0;
             fptr->encs.ecopts = Qnil;
             clear_codeconv(fptr);
 	}
@@ -6610,12 +6610,12 @@
 	    VALUE tmp = rb_check_string_type(v1);
 	    if (!NIL_P(tmp)) {
 		mode_enc(fptr, StringValueCStr(tmp));
-                fptr->encs.flags = rb_econv_prepare_opts(opt, &fptr->encs.ecopts);
+                fptr->encs.ecflags = rb_econv_prepare_opts(opt, &fptr->encs.ecopts);
 	    }
 	    else {
 		fptr->encs.enc = rb_to_encoding(v1);
 		fptr->encs.enc2 = NULL;
-                fptr->encs.flags = 0;
+                fptr->encs.ecflags = 0;
                 fptr->encs.ecopts = Qnil;
                 clear_codeconv(fptr);
 	    }

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

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