diff --git a/ChangeLog b/ChangeLog index e507be70d4..a4ebf8225c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +Mon Jun 4 04:24:06 2012 Tadayoshi Funaba + + * 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 * process.c (rb_spawn_process): fix for Windows. not tested. diff --git a/complex.c b/complex.c index 6036ab72fd..1aae3b6ca8 100644 --- a/complex.c +++ b/complex.c @@ -1254,17 +1254,6 @@ nucomp_marshal_dump(VALUE self) 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) @@ -1283,30 +1272,6 @@ nucomp_marshal_load(VALUE self, VALUE a) 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 @@ Init_Complex(void) 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 /* --- */ diff --git a/include/ruby/intern.h b/include/ruby/intern.h index e963d99b06..9690964ac8 100644 --- a/include/ruby/intern.h +++ b/include/ruby/intern.h @@ -147,9 +147,6 @@ VALUE rb_rational_new(VALUE, VALUE); 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_polar(VALUE, VALUE); 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); diff --git a/marshal.c b/marshal.c index 45048db2f2..046729d364 100644 --- a/marshal.c +++ b/marshal.c @@ -1622,21 +1622,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod) } 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); } diff --git a/rational.c b/rational.c index 6fda5a29ce..c4469c8092 100644 --- a/rational.c +++ b/rational.c @@ -1600,16 +1600,6 @@ nurat_marshal_dump(VALUE self) 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) @@ -1632,30 +1622,6 @@ nurat_marshal_load(VALUE self, VALUE a) 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 @@ Init_Rational(void) 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 /* --- */