1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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>
* 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
VALUE marshal_dump(int, VALUE *);
/* :nodoc: */
static VALUE
nucomp_marshal__dump(VALUE self, VALUE limit)
{
VALUE argv[1];
argv[0] = nucomp_marshal_dump(self);
return marshal_dump(1, argv);
VALUE arg;
arg = nucomp_marshal_dump(self);
return rb_marshal_dump(arg, Qnil);
}
#endif
@ -1286,13 +1284,11 @@ nucomp_marshal_load(VALUE self, VALUE a)
}
#ifdef MARSHAL_OLD_STYLE
VALUE marshal_load(int, VALUE *);
/* :nodoc: */
static VALUE
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

View file

@ -899,7 +899,7 @@ clear_dump_arg(struct dump_arg *arg)
* ThreadGroup, Continuation
* * objects which defines singleton methods
*/
VALUE
static VALUE
marshal_dump(int argc, VALUE *argv)
{
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
* is deserialized.
*/
VALUE
static VALUE
marshal_load(int argc, VALUE *argv)
{
VALUE port, proc;

View file

@ -1601,15 +1601,12 @@ nurat_marshal_dump(VALUE self)
}
#ifdef MARSHAL_OLD_STYLE
VALUE marshal_dump(int, VALUE *);
/* :nodoc: */
static VALUE
nurat_marshal__dump(VALUE self, VALUE limit)
{
VALUE argv[1];
argv[0] = nurat_marshal_dump(self);
return marshal_dump(1, argv);
VALUE arg = nurat_marshal_dump(self);
return rb_marshal_dump(arg, Qnil);
}
#endif
@ -1636,13 +1633,11 @@ nurat_marshal_load(VALUE self, VALUE a)
}
#ifdef MARSHAL_OLD_STYLE
VALUE marshal_load(int, VALUE *);
/* :nodoc: */
static VALUE
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