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

ruby-changes:8278

From: mame <ko1@a...>
Date: Fri, 17 Oct 2008 00:25:51 +0900 (JST)
Subject: [ruby-changes:8278] Ruby:r19805 (trunk): * io.c (rb_getc, rb_io_fread, rb_io_fwrite, rb_read_pending):

mame	2008-10-17 00:18:17 +0900 (Fri, 17 Oct 2008)

  New Revision: 19805

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

  Log:
    * io.c (rb_getc, rb_io_fread, rb_io_fwrite, rb_read_pending):
      remove deprecated functions which do not work.  [ruby-dev:36697]

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

Index: include/ruby/io.h
===================================================================
--- include/ruby/io.h	(revision 19804)
+++ include/ruby/io.h	(revision 19805)
@@ -162,11 +162,6 @@
 int rb_io_read_pending(rb_io_t*);
 void rb_read_check(FILE*);
 
-DEPRECATED(int rb_getc(FILE*));
-DEPRECATED(long rb_io_fread(char *, long, FILE *));
-DEPRECATED(long rb_io_fwrite(const char *, long, FILE *));
-DEPRECATED(int rb_read_pending(FILE*));
-
 #if defined(__cplusplus)
 #if 0
 { /* satisfy cc-mode */
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 19804)
+++ ChangeLog	(revision 19805)
@@ -1,3 +1,8 @@
+Fri Oct 17 00:16:08 2008  Yusuke Endoh  <mame@t...>
+
+	* io.c (rb_getc, rb_io_fread, rb_io_fwrite, rb_read_pending):
+	  remove deprecated functions which do not work.  [ruby-dev:36697]
+
 Thu Oct 16 23:48:34 2008  Tanaka Akira  <akr@f...>
 
 	* common.mk (TESTS): removed to re-enable test for minitest.
Index: io.c
===================================================================
--- io.c	(revision 19804)
+++ io.c	(revision 19805)
@@ -404,12 +404,6 @@
 }
 
 int
-rb_read_pending(FILE *fp)
-{
-    return STDIO_READ_DATA_PENDING(fp);
-}
-
-int
 rb_io_read_pending(rb_io_t *fptr)
 {
     return READ_DATA_PENDING(fptr);
@@ -846,18 +840,6 @@
     return io_binwrite(str, fptr, nosync);
 }
 
-long
-rb_io_fwrite(const char *ptr, long len, FILE *f)
-{
-    rb_io_t of;
-
-    of.fd = fileno(f);
-    of.stdio_file = f;
-    of.mode = FMODE_WRITABLE;
-    of.pathv = Qnil;
-    return io_fwrite(rb_str_new(ptr, len), &of, 0);
-}
-
 static VALUE
 io_write(VALUE io, VALUE str, int nosync)
 {
@@ -1408,22 +1390,6 @@
     return len - n;
 }
 
-long
-rb_io_fread(char *ptr, long len, FILE *f)
-{
-    rb_io_t of;
-    VALUE str;
-    long n;
-
-    of.fd = fileno(f);
-    of.stdio_file = f;
-    of.mode = FMODE_READABLE;
-    str = rb_str_new(ptr, len);
-    n = io_fread(str, 0, &of);
-    MEMCPY(ptr, RSTRING_PTR(str), char, n);
-    return n;
-}
-
 #define SMALLBUF 100
 
 static long
@@ -2705,17 +2671,7 @@
     READ_CHECK(fptr);
     return io_getc(fptr, enc);
 }
-int
-rb_getc(FILE *f)
-{
-    int c;
 
-    rb_read_check(f);
-    c = getc(f);
-
-    return c;
-}
-
 /*
  *  call-seq:
  *     ios.readchar   => string

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

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