use rb_marshal_{dump,load}

* marshal.c: revert r35879 "now marshal_{load|dump} are external."
* complex.c (nucomp_marshal__{dump,load}): should use rb_marshal_{dump,load}.
* rational.c (nurat_marshal__{dump,load}): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35881 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-06-03 07:34:03 +00:00
parent 5dc5a52612
commit 694035eb35
4 changed files with 17 additions and 18 deletions

View File

@ -1,3 +1,11 @@
Sun Jun 3 16:33:58 2012 Nobuyoshi Nakada <nobu@ruby-lang.org>
* marshal.c: revert r35879 "now marshal_{load|dump} are external."
* complex.c (nucomp_marshal__{dump,load}): should use rb_marshal_{dump,load}.
* rational.c (nurat_marshal__{dump,load}): ditto.
Sun Jun 3 14:13:58 2012 Tadayoshi Funaba <tadf@dotrb.org> Sun Jun 3 14:13:58 2012 Tadayoshi Funaba <tadf@dotrb.org>
* ext/date/date_core.c: checks whether the object is frozen or not. * ext/date/date_core.c: checks whether the object is frozen or not.

View File

@ -1255,15 +1255,13 @@ nucomp_marshal_dump(VALUE self)
} }
#ifdef MARSHAL_OLD_STYLE #ifdef MARSHAL_OLD_STYLE
VALUE marshal_dump(int, VALUE *);
/* :nodoc: */ /* :nodoc: */
static VALUE static VALUE
nucomp_marshal__dump(VALUE self, VALUE limit) nucomp_marshal__dump(VALUE self, VALUE limit)
{ {
VALUE argv[1]; VALUE arg;
argv[0] = nucomp_marshal_dump(self); arg = nucomp_marshal_dump(self);
return marshal_dump(1, argv); return rb_marshal_dump(arg, Qnil);
} }
#endif #endif
@ -1286,13 +1284,11 @@ nucomp_marshal_load(VALUE self, VALUE a)
} }
#ifdef MARSHAL_OLD_STYLE #ifdef MARSHAL_OLD_STYLE
VALUE marshal_load(int, VALUE *);
/* :nodoc: */ /* :nodoc: */
static VALUE static VALUE
nucomp_marshal__load(VALUE klass, VALUE s) nucomp_marshal__load(VALUE klass, VALUE s)
{ {
return nucomp_marshal_load(nucomp_s_alloc(klass), marshal_load(1, &s)); return nucomp_marshal_load(nucomp_s_alloc(klass), rb_marshal_load(s));
} }
#endif #endif

View File

@ -899,7 +899,7 @@ clear_dump_arg(struct dump_arg *arg)
* ThreadGroup, Continuation * ThreadGroup, Continuation
* * objects which defines singleton methods * * objects which defines singleton methods
*/ */
VALUE static VALUE
marshal_dump(int argc, VALUE *argv) marshal_dump(int argc, VALUE *argv)
{ {
VALUE obj, port, a1, a2; VALUE obj, port, a1, a2;
@ -1752,7 +1752,7 @@ clear_load_arg(struct load_arg *arg)
* to_str. If proc is specified, it will be passed each object as it * to_str. If proc is specified, it will be passed each object as it
* is deserialized. * is deserialized.
*/ */
VALUE static VALUE
marshal_load(int argc, VALUE *argv) marshal_load(int argc, VALUE *argv)
{ {
VALUE port, proc; VALUE port, proc;

View File

@ -1601,15 +1601,12 @@ nurat_marshal_dump(VALUE self)
} }
#ifdef MARSHAL_OLD_STYLE #ifdef MARSHAL_OLD_STYLE
VALUE marshal_dump(int, VALUE *);
/* :nodoc: */ /* :nodoc: */
static VALUE static VALUE
nurat_marshal__dump(VALUE self, VALUE limit) nurat_marshal__dump(VALUE self, VALUE limit)
{ {
VALUE argv[1]; VALUE arg = nurat_marshal_dump(self);
argv[0] = nurat_marshal_dump(self); return rb_marshal_dump(arg, Qnil);
return marshal_dump(1, argv);
} }
#endif #endif
@ -1636,13 +1633,11 @@ nurat_marshal_load(VALUE self, VALUE a)
} }
#ifdef MARSHAL_OLD_STYLE #ifdef MARSHAL_OLD_STYLE
VALUE marshal_load(int, VALUE *);
/* :nodoc: */ /* :nodoc: */
static VALUE static VALUE
nurat_marshal__load(VALUE klass, VALUE s) nurat_marshal__load(VALUE klass, VALUE s)
{ {
return nurat_marshal_load(nurat_s_alloc(klass), marshal_load(1, &s)); return nurat_marshal_load(nurat_s_alloc(klass), rb_marshal_load(s));
} }
#endif #endif