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

ruby-changes:7221

From: akr <ko1@a...>
Date: Thu, 21 Aug 2008 02:35:14 +0900 (JST)
Subject: [ruby-changes:7221] Ruby:r18740 (trunk): * io.c (prep_io): local variable renamed.

akr	2008-08-21 02:31:53 +0900 (Thu, 21 Aug 2008)

  New Revision: 18740

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

  Log:
    * io.c (prep_io): local variable renamed.
      (rb_io_fdopen): ditto.
      (prep_stdio): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/io.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 18739)
+++ ChangeLog	(revision 18740)
@@ -1,3 +1,9 @@
+Thu Aug 21 02:27:03 2008  Tanaka Akira  <akr@f...>
+
+	* io.c (prep_io): local variable renamed.
+	  (rb_io_fdopen): ditto.
+	  (prep_stdio): ditto.
+
 Thu Aug 21 01:58:59 2008  Shugo Maeda  <shugo@r...>
 
 	* configure.in: always check timezone().
Index: io.c
===================================================================
--- io.c	(revision 18739)
+++ io.c	(revision 18740)
@@ -5376,7 +5376,7 @@
 }
 
 static VALUE
-prep_io(int fd, int mode, VALUE klass, const char *path)
+prep_io(int fd, int flags, VALUE klass, const char *path)
 {
     rb_io_t *fp;
     VALUE io = io_alloc(klass);
@@ -5385,11 +5385,11 @@
     fp->fd = fd;
 #ifdef __CYGWIN__
     if (!isatty(fd)) {
-        mode |= FMODE_BINMODE;
+        flags |= FMODE_BINMODE;
 	setmode(fd, O_BINARY);
     }
 #endif
-    fp->mode = mode;
+    fp->mode = flags;
     io_check_tty(fp);
     if (path) fp->path = strdup(path);
 
@@ -5397,19 +5397,19 @@
 }
 
 VALUE
-rb_io_fdopen(int fd, int mode, const char *path)
+rb_io_fdopen(int fd, int modenum, const char *path)
 {
     VALUE klass = rb_cIO;
 
     if (path && strcmp(path, "-")) klass = rb_cFile;
-    return prep_io(fd, rb_io_modenum_flags(mode), klass, path);
+    return prep_io(fd, rb_io_modenum_flags(modenum), klass, path);
 }
 
 static VALUE
-prep_stdio(FILE *f, int mode, VALUE klass, const char *path)
+prep_stdio(FILE *f, int flags, VALUE klass, const char *path)
 {
     rb_io_t *fptr;
-    VALUE io = prep_io(fileno(f), mode|FMODE_PREP, klass, path);
+    VALUE io = prep_io(fileno(f), flags|FMODE_PREP, klass, path);
 
     GetOpenFile(io, fptr);
     fptr->stdio_file = f;

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

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