summaryrefslogtreecommitdiff
path: root/rational.c
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-03 07:34:03 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-03 07:34:03 (GMT)
commit694035eb35d7dc52ae58d8306cad2c2d6b0bf240 (patch)
treee1addaf8364b403a8f62b5cf68177d046b74260f /rational.c
parent5dc5a526125b25200fb6566257756bccbc4474c8 (diff)
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
Diffstat (limited to 'rational.c')
-rw-r--r--rational.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/rational.c b/rational.c
index 258f901..248fcda 100644
--- a/rational.c
+++ b/rational.c
@@ -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