mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* marshal.c: experimental test aborted.
* complex.c: ditto. * rational.c: ditto. * include/ruby/intern.h: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35893 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
6b348951ca
commit
eb6579e647
5 changed files with 7 additions and 109 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
Mon Jun 4 04:24:06 2012 Tadayoshi Funaba <tadf@dotrb.org>
|
||||||
|
|
||||||
|
* 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@fsij.org>
|
Mon Jun 4 00:45:18 2012 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* process.c (rb_spawn_process): fix for Windows. not tested.
|
* process.c (rb_spawn_process): fix for Windows. not tested.
|
||||||
|
|
45
complex.c
45
complex.c
|
@ -1254,17 +1254,6 @@ nucomp_marshal_dump(VALUE self)
|
||||||
return a;
|
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: */
|
/* :nodoc: */
|
||||||
static VALUE
|
static VALUE
|
||||||
nucomp_marshal_load(VALUE self, VALUE a)
|
nucomp_marshal_load(VALUE self, VALUE a)
|
||||||
|
@ -1283,30 +1272,6 @@ nucomp_marshal_load(VALUE self, VALUE a)
|
||||||
return self;
|
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
|
VALUE
|
||||||
|
@ -1985,18 +1950,8 @@ Init_Complex(void)
|
||||||
rb_define_method(rb_cComplex, "to_s", nucomp_to_s, 0);
|
rb_define_method(rb_cComplex, "to_s", nucomp_to_s, 0);
|
||||||
rb_define_method(rb_cComplex, "inspect", nucomp_inspect, 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_dump", nucomp_marshal_dump, 0);
|
||||||
rb_define_method(rb_cComplex, "marshal_load", nucomp_marshal_load, 1);
|
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
|
|
||||||
|
|
||||||
/* --- */
|
/* --- */
|
||||||
|
|
||||||
|
|
|
@ -147,9 +147,6 @@ VALUE rb_rational_new(VALUE, VALUE);
|
||||||
VALUE rb_Rational(VALUE, VALUE);
|
VALUE rb_Rational(VALUE, VALUE);
|
||||||
#define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
|
#define rb_Rational1(x) rb_Rational((x), INT2FIX(1))
|
||||||
#define rb_Rational2(x,y) rb_Rational((x), (y))
|
#define rb_Rational2(x,y) rb_Rational((x), (y))
|
||||||
#ifdef MARSHAL_LOAD_DIRECT
|
|
||||||
VALUE rb_Rational_marshal_load(VALUE, VALUE);
|
|
||||||
#endif
|
|
||||||
/* complex.c */
|
/* complex.c */
|
||||||
VALUE rb_complex_raw(VALUE, VALUE);
|
VALUE rb_complex_raw(VALUE, VALUE);
|
||||||
#define rb_complex_raw1(x) rb_complex_raw((x), INT2FIX(0))
|
#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);
|
VALUE rb_Complex(VALUE, VALUE);
|
||||||
#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
|
#define rb_Complex1(x) rb_Complex((x), INT2FIX(0))
|
||||||
#define rb_Complex2(x,y) rb_Complex((x), (y))
|
#define rb_Complex2(x,y) rb_Complex((x), (y))
|
||||||
#ifdef MARSHAL_LOAD_DIRECT
|
|
||||||
VALUE rb_Complex_marshal_load(VALUE, VALUE);
|
|
||||||
#endif
|
|
||||||
/* class.c */
|
/* class.c */
|
||||||
VALUE rb_class_boot(VALUE);
|
VALUE rb_class_boot(VALUE);
|
||||||
VALUE rb_class_new(VALUE);
|
VALUE rb_class_new(VALUE);
|
||||||
|
|
14
marshal.c
14
marshal.c
|
@ -1622,21 +1622,7 @@ r_object0(struct load_arg *arg, int *ivp, VALUE extmod)
|
||||||
}
|
}
|
||||||
v = r_entry(v, arg);
|
v = r_entry(v, arg);
|
||||||
data = r_object(arg);
|
data = r_object(arg);
|
||||||
#ifndef MARSHAL_LOAD_DIRECT
|
|
||||||
rb_funcall(v, s_mload, 1, data);
|
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);
|
check_load_arg(arg, s_mload);
|
||||||
v = r_leave(v, arg);
|
v = r_leave(v, arg);
|
||||||
}
|
}
|
||||||
|
|
44
rational.c
44
rational.c
|
@ -1600,16 +1600,6 @@ nurat_marshal_dump(VALUE self)
|
||||||
return a;
|
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: */
|
/* :nodoc: */
|
||||||
static VALUE
|
static VALUE
|
||||||
nurat_marshal_load(VALUE self, VALUE a)
|
nurat_marshal_load(VALUE self, VALUE a)
|
||||||
|
@ -1632,30 +1622,6 @@ nurat_marshal_load(VALUE self, VALUE a)
|
||||||
return self;
|
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
|
VALUE
|
||||||
|
@ -2408,18 +2374,8 @@ Init_Rational(void)
|
||||||
rb_define_method(rb_cRational, "to_s", nurat_to_s, 0);
|
rb_define_method(rb_cRational, "to_s", nurat_to_s, 0);
|
||||||
rb_define_method(rb_cRational, "inspect", nurat_inspect, 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_dump", nurat_marshal_dump, 0);
|
||||||
rb_define_method(rb_cRational, "marshal_load", nurat_marshal_load, 1);
|
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
|
|
||||||
|
|
||||||
/* --- */
|
/* --- */
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue