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

ruby-changes:3754

From: ko1@a...
Date: Sat, 26 Jan 2008 01:38:04 +0900 (JST)
Subject: [ruby-changes:3754] akr - Ruby:r15243 (trunk): * marshal.c (r_byte): use getbyte instead of getc.

akr	2008-01-26 01:37:53 +0900 (Sat, 26 Jan 2008)

  New Revision: 15243

  Modified files:
    trunk/ChangeLog
    trunk/marshal.c

  Log:
    * marshal.c (r_byte): use getbyte instead of getc.
      (marshal_load): ditto.
      [ruby-dev:33264]


  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/ChangeLog?r1=15243&r2=15242&diff_format=u
  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/trunk/marshal.c?r1=15243&r2=15242&diff_format=u

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 15242)
+++ ChangeLog	(revision 15243)
@@ -1,3 +1,9 @@
+Sat Jan 26 01:35:46 2008  Tanaka Akira  <akr@f...>
+
+	* marshal.c (r_byte): use getbyte instead of getc.
+	  (marshal_load): ditto.
+	  [ruby-dev:33264]
+
 Sat Jan 26 00:43:40 2008  Tanaka Akira  <akr@f...>
 
 	* io.c (rb_io_getline_fast): don't care ASCII incompatible encoding.
Index: marshal.c
===================================================================
--- marshal.c	(revision 15242)
+++ marshal.c	(revision 15243)
@@ -80,7 +80,7 @@
 
 static ID s_dump, s_load, s_mdump, s_mload;
 static ID s_dump_data, s_load_data, s_alloc;
-static ID s_getc, s_read, s_write, s_binmode;
+static ID s_getbyte, s_read, s_write, s_binmode;
 
 ID rb_id_encoding(void);
 
@@ -903,7 +903,7 @@
     }
     else {
 	VALUE src = arg->src;
-	VALUE v = rb_funcall2(src, s_getc, 0, 0);
+	VALUE v = rb_funcall2(src, s_getbyte, 0, 0);
 	if (NIL_P(v)) rb_eof_error();
 	c = (unsigned char)NUM2CHR(v);
     }
@@ -1556,7 +1556,7 @@
 	arg.taint = OBJ_TAINTED(port); /* original taintedness */
 	StringValue(port);	       /* possible conversion */
     }
-    else if (rb_respond_to(port, s_getc) && rb_respond_to(port, s_read)) {
+    else if (rb_respond_to(port, s_getbyte) && rb_respond_to(port, s_read)) {
 	if (rb_respond_to(port, s_binmode)) {
 	    rb_funcall2(port, s_binmode, 0, 0);
 	}
@@ -1637,7 +1637,7 @@
     s_dump_data = rb_intern("_dump_data");
     s_load_data = rb_intern("_load_data");
     s_alloc = rb_intern("_alloc");
-    s_getc = rb_intern("getc");
+    s_getbyte = rb_intern("getbyte");
     s_read = rb_intern("read");
     s_write = rb_intern("write");
     s_binmode = rb_intern("binmode");

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

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