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

ruby-changes:23842

From: tadf <ko1@a...>
Date: Mon, 4 Jun 2012 04:27:09 +0900 (JST)
Subject: [ruby-changes:23842] tadf:r35893 (trunk): * marshal.c: experimental test aborted.

tadf	2012-06-04 04:26:58 +0900 (Mon, 04 Jun 2012)

  New Revision: 35893

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

  Log:
    * marshal.c: experimental test aborted.
    * complex.c: ditto.
    * rational.c: ditto.
    * include/ruby/intern.h: ditto.

  Modified files:
    trunk/ChangeLog
    trunk/complex.c
    trunk/include/ruby/intern.h
    trunk/marshal.c
    trunk/rational.c

Index: complex.c
===================================================================
--- complex.c	(revision 35892)
+++ complex.c	(revision 35893)
@@ -1254,19 +1254,8 @@
     return a;
 }
 
-#ifdef MARSHAL_OLD_STYLE
 /* :nodoc: */
 static VALUE
-nucomp_marshal__dump(VALUE self, VALUE limit)
-{
-    VALUE arg;
-    arg = nucomp_marshal_dump(self);
-    return rb_marshal_dump(arg, Qnil);
-}
-#endif
-
-/* :nodoc: */
-static VALUE
 nucomp_marshal_load(VALUE self, VALUE a)
 {
     get_dat1(self);
@@ -1283,30 +1272,6 @@
     return self;
 }
 
-#ifdef MARSHAL_LOAD_DIRECT
-/* :nodoc: */
-static VALUE
-nucomp_marshal_load_fake(VALUE self, VALUE a)
-{
-    rb_raise(rb_eNotImpError, "not implemented");
-}
-
-VALUE
-rb_Complex_marshal_load(VALUE obj, VALUE a)
-{
-    return nucomp_marshal_load(obj, a);
-}
-#endif
-
-#ifdef MARSHAL_OLD_STYLE
-/* :nodoc: */
-static VALUE
-nucomp_marshal__load(VALUE klass, VALUE s)
-{
-    return nucomp_marshal_load(nucomp_s_alloc(klass), rb_marshal_load(s));
-}
-#endif
-
 /* --- */
 
 VALUE
@@ -1985,18 +1950,8 @@
     rb_define_method(rb_cComplex, "to_s", nucomp_to_s, 0);
     rb_define_method(rb_cComplex, "inspect", nucomp_inspect, 0);
 
-#ifndef MARSHAL_LOAD_DIRECT
-#ifndef MARSHAL_OLD_STYLE
     rb_define_method(rb_cComplex, "marshal_dump", nucomp_marshal_dump, 0);
     rb_define_method(rb_cComplex, "marshal_load", nucomp_marshal_load, 1);
-#else
-    rb_define_method(rb_cComplex, "_dump", nucomp_marshal__dump, 1);
-    rb_define_singleton_method(rb_cComplex, "_load", nucomp_marshal__load, 1);
-#endif
-#else
-    rb_define_method(rb_cComplex, "marshal_dump", nucomp_marshal_dump, 0);
-    rb_define_method(rb_cComplex, "marshal_load", nucomp_marshal_load_fake, 1);
-#endif
 
     /* --- */
 
Index: include/ruby/intern.h
===================================================================
--- include/ruby/intern.h	(revision 35892)
+++ include/ruby/intern.h	(revision 35893)
@@ -147,9 +147,6 @@
 VALUE rb_Rational(VALUE, VALUE);
 #define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
 #define rb_Rational2(x,y) rb_Rational((x), (y))
-#ifdef MARSHAL_LOAD_DIRECT
-VALUE rb_Rational_marshal_load(VALUE, VALUE);
-#endif
 /* complex.c */
 VALUE rb_complex_raw(VALUE, VALUE);
 #define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
@@ -161,9 +158,6 @@
 VALUE rb_Complex(VALUE, VALUE);
 #define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
 #define rb_Complex2(x,y) rb_Complex((x), (y))
-#ifdef MARSHAL_LOAD_DIRECT
-VALUE rb_Complex_marshal_load(VALUE, VALUE);
-#endif
 /* class.c */
 VALUE rb_class_boot(VALUE);
 VALUE rb_class_new(VALUE);
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 35892)
+++ ChangeLog	(revision 35893)
@@ -1,3 +1,10 @@
+Mon Jun  4 04:24:06 2012  Tadayoshi Funaba  <tadf@d...>
+
+	* marshal.c: experimental test aborted.
+	* complex.c: ditto.
+	* rational.c: ditto.
+	* include/ruby/intern.h: ditto.
+
 Mon Jun  4 00:45:18 2012  Tanaka Akira  <akr@f...>
 
 	* process.c (rb_spawn_process): fix for Windows.  not tested.
Index: marshal.c
===================================================================
--- marshal.c	(revision 35892)
+++ marshal.c	(revision 35893)
@@ -1622,21 +1622,7 @@
 	    }
 	    v = r_entry(v, arg);
 	    data = r_object(arg);
-#ifndef MARSHAL_LOAD_DIRECT
 	    rb_funcall(v, s_mload, 1, data);
-#else
-	    switch (TYPE(v)) {
-	    case T_COMPLEX:
-	      rb_Complex_marshal_load(v, data);
-	      break;
-	    case T_RATIONAL:
-	      rb_Rational_marshal_load(v, data);
-	      break;
-	    default:
-	      rb_funcall(v, s_mload, 1, data);
-	      break;
-	    }
-#endif
 	    check_load_arg(arg, s_mload);
             v = r_leave(v, arg);
 	}
Index: rational.c
===================================================================
--- rational.c	(revision 35892)
+++ rational.c	(revision 35893)
@@ -1600,18 +1600,8 @@
     return a;
 }
 
-#ifdef MARSHAL_OLD_STYLE
 /* :nodoc: */
 static VALUE
-nurat_marshal__dump(VALUE self, VALUE limit)
-{
-    VALUE arg = nurat_marshal_dump(self);
-    return rb_marshal_dump(arg, Qnil);
-}
-#endif
-
-/* :nodoc: */
-static VALUE
 nurat_marshal_load(VALUE self, VALUE a)
 {
     get_dat1(self);
@@ -1632,30 +1622,6 @@
     return self;
 }
 
-#ifdef MARSHAL_LOAD_DIRECT
-/* :nodoc: */
-static VALUE
-nurat_marshal_load_fake(VALUE self, VALUE a)
-{
-    rb_raise(rb_eNotImpError, "not implemented");
-}
-
- VALUE
-rb_Rational_marshal_load(VALUE obj, VALUE a)
-{
-    return nurat_marshal_load(obj, a);
-}
-#endif
-
-#ifdef MARSHAL_OLD_STYLE
-/* :nodoc: */
-static VALUE
-nurat_marshal__load(VALUE klass, VALUE s)
-{
-    return nurat_marshal_load(nurat_s_alloc(klass), rb_marshal_load(s));
-}
-#endif
-
 /* --- */
 
 VALUE
@@ -2408,18 +2374,8 @@
     rb_define_method(rb_cRational, "to_s", nurat_to_s, 0);
     rb_define_method(rb_cRational, "inspect", nurat_inspect, 0);
 
-#ifndef MARSHAL_LOAD_DIRECT
-#ifndef MARSHAL_OLD_STYLE
     rb_define_method(rb_cRational, "marshal_dump", nurat_marshal_dump, 0);
     rb_define_method(rb_cRational, "marshal_load", nurat_marshal_load, 1);
-#else
-    rb_define_method(rb_cRational, "_dump", nurat_marshal__dump, 1);
-    rb_define_singleton_method(rb_cRational, "_load", nurat_marshal__load, 1);
-#endif
-#else
-    rb_define_method(rb_cRational, "marshal_dump", nurat_marshal_dump, 0);
-    rb_define_method(rb_cRational, "marshal_load", nurat_marshal_load_fake, 1);
-#endif
 
     /* --- */
 

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

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