[macruby-changes] [4059] MacRuby/trunk

source_changes at macosforge.org source_changes at macosforge.org
Mon May 10 16:09:11 PDT 2010


Revision: 4059
          http://trac.macosforge.org/projects/ruby/changeset/4059
Author:   lsansonetti at apple.com
Date:     2010-05-10 16:09:08 -0700 (Mon, 10 May 2010)
Log Message:
-----------
fixed rb_io_write signature to match MRI

Modified Paths:
--------------
    MacRuby/trunk/error.c
    MacRuby/trunk/include/ruby/intern.h
    MacRuby/trunk/io.c
    MacRuby/trunk/marshal.c

Modified: MacRuby/trunk/error.c
===================================================================
--- MacRuby/trunk/error.c	2010-05-10 22:30:02 UTC (rev 4058)
+++ MacRuby/trunk/error.c	2010-05-10 23:09:08 UTC (rev 4059)
@@ -193,8 +193,8 @@
 rb_warn_m(VALUE self, SEL sel, VALUE mesg)
 {
     if (!NIL_P(ruby_verbose)) {
-	rb_io_write(rb_stderr, (SEL)0, mesg);
-	rb_io_write(rb_stderr, (SEL)0, rb_default_rs);
+	rb_io_write(rb_stderr, mesg);
+	rb_io_write(rb_stderr, rb_default_rs);
     }
     return Qnil;
 }

Modified: MacRuby/trunk/include/ruby/intern.h
===================================================================
--- MacRuby/trunk/include/ruby/intern.h	2010-05-10 22:30:02 UTC (rev 4058)
+++ MacRuby/trunk/include/ruby/intern.h	2010-05-10 23:09:08 UTC (rev 4059)
@@ -389,7 +389,7 @@
 RUBY_EXTERN VALUE rb_rs;
 RUBY_EXTERN VALUE rb_default_rs;
 RUBY_EXTERN VALUE rb_output_rs;
-VALUE rb_io_write(VALUE, SEL, VALUE);
+VALUE rb_io_write(VALUE, VALUE);
 VALUE rb_io_gets(VALUE, SEL);
 VALUE rb_io_getbyte(VALUE, SEL);
 VALUE rb_io_ungetc(VALUE, SEL, VALUE);

Modified: MacRuby/trunk/io.c
===================================================================
--- MacRuby/trunk/io.c	2010-05-10 22:30:02 UTC (rev 4058)
+++ MacRuby/trunk/io.c	2010-05-10 23:09:08 UTC (rev 4059)
@@ -2548,7 +2548,7 @@
 VALUE
 rb_io_printf(VALUE out, SEL sel, int argc, VALUE *argv)
 {
-    return rb_io_write(out, sel, rb_f_sprintf(argc, argv));
+    return rb_io_write(out, rb_f_sprintf(argc, argv));
 }
 
 /*
@@ -2613,13 +2613,13 @@
         argv = &line;
     }
     while (argc--) {
-        rb_io_write(io, 0, *argv++);
+        rb_io_write(io, *argv++);
         if (!NIL_P(rb_output_fs)) {
-            rb_io_write(io, 0, rb_output_fs);
+            rb_io_write(io, rb_output_fs);
         }
     }
     if (!NIL_P(rb_output_rs)) {
-        rb_io_write(io, 0, rb_output_rs);
+        rb_io_write(io, rb_output_rs);
     }
     return Qnil;
 }
@@ -2674,7 +2674,7 @@
 rb_io_putc(VALUE io, SEL sel, VALUE ch)
 {
     char c = NUM2CHR(ch);
-    rb_io_write(io, sel, rb_str_new(&c, 1));
+    rb_io_write(io, rb_str_new(&c, 1));
     return ch;
 }
 
@@ -2739,7 +2739,7 @@
     VALUE line;
     int i;
     if (argc == 0) {
-        rb_io_write(out, sel, rb_default_rs);
+        rb_io_write(out, rb_default_rs);
         return Qnil;
     }
     for (i = 0; i < argc; i++) {
@@ -2749,12 +2749,12 @@
             continue;
         }
         line = rb_obj_as_string(argv[i]);
-        rb_io_write(out, sel, line);
+        rb_io_write(out, line);
         if (RSTRING_LEN(line) == 0
 		|| RSTRING_PTR(line)[RSTRING_LEN(line)-1] != '\n') {
             // If the last character of line was a newline, there's no reason
 	    // to write another.
-            rb_io_write(out, sel, rb_default_rs);
+            rb_io_write(out, rb_default_rs);
         }
     }
     return Qnil;
@@ -2778,12 +2778,12 @@
 void
 rb_p(VALUE obj, SEL sel) /* for debug print within C code */
 {
-    rb_io_write(rb_stdout, 0, rb_obj_as_string(rb_inspect(obj)));
-    rb_io_write(rb_stdout, 0, rb_default_rs);
+    rb_io_write(rb_stdout, rb_obj_as_string(rb_inspect(obj)));
+    rb_io_write(rb_stdout, rb_default_rs);
 }
 
 VALUE
-rb_io_write(VALUE v, SEL sel, VALUE i)
+rb_io_write(VALUE v, VALUE i)
 {
     io_write(v, 0, i);
     return Qnil;
@@ -2860,7 +2860,7 @@
     if (NIL_P(port)) {
 	port = rb_stdout;
     }
-    return rb_io_write(port, 0, self);
+    return rb_io_write(port, self);
 }
 
 // static void
@@ -4478,7 +4478,7 @@
 	fwrite(mesg, sizeof(char), len, stderr);
     }
     else {
-	rb_io_write(rb_stderr, 0, rb_str_new(mesg, len));
+	rb_io_write(rb_stderr, rb_str_new(mesg, len));
     }
 }
 

Modified: MacRuby/trunk/marshal.c
===================================================================
--- MacRuby/trunk/marshal.c	2010-05-10 22:30:02 UTC (rev 4058)
+++ MacRuby/trunk/marshal.c	2010-05-10 23:09:08 UTC (rev 4059)
@@ -227,7 +227,7 @@
 	if (arg->taint) {
 	    OBJ_TAINT(buf);
 	}
-	rb_io_write(arg->dest, 0, buf);
+	rb_io_write(arg->dest, buf);
 	rb_str_resize(buf, 0);
     }
 #endif
@@ -904,7 +904,7 @@
     w_object(arg->obj, arg->arg, arg->limit);
 #if 0 // unused
     if (arg->arg->dest) {
-	rb_io_write(arg->arg->dest, 0, arg->arg->str);
+	rb_io_write(arg->arg->dest, arg->arg->str);
 	rb_bstr_resize(arg->arg->str, 0);
     }
 #endif
@@ -1023,7 +1023,7 @@
     // If we got an IO object as the port, make sure to write the bytestring
     // to it before leaving!
     if (got_io) {
-	rb_io_write(port, 0, arg->str);	
+	rb_io_write(port, arg->str);	
     }
     else {
 	rb_str_force_encoding(port, rb_encodings[ENCODING_UTF8]);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-changes/attachments/20100510/dcd724e9/attachment.html>


More information about the macruby-changes mailing list