[前][次][番号順一覧][スレッド一覧]

ruby-changes:23830

From: nobu <ko1@a...>
Date: Sun, 3 Jun 2012 16:34:12 +0900 (JST)
Subject: [ruby-changes:23830] nobu:r35881 (trunk): use rb_marshal_{dump,load}

nobu	2012-06-03 16:34:03 +0900 (Sun, 03 Jun 2012)

  New Revision: 35881

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=35881

  Log:
    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.

  Modified files:
    trunk/ChangeLog
    trunk/complex.c
    trunk/marshal.c
    trunk/rational.c

Index: complex.c
===================================================================
--- complex.c	(revision 35880)
+++ complex.c	(revision 35881)
@@ -1255,15 +1255,13 @@
 }
 
 #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 @@
 }
 
 #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
 
Index: ChangeLog
===================================================================
--- ChangeLog	(revision 35880)
+++ ChangeLog	(revision 35881)
@@ -1,3 +1,11 @@
+Sun Jun  3 16:33:58 2012  Nobuyoshi Nakada  <nobu@r...>
+
+	* 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@d...>
 
 	* ext/date/date_core.c: checks whether the object is frozen or not.
Index: marshal.c
===================================================================
--- marshal.c	(revision 35880)
+++ marshal.c	(revision 35881)
@@ -899,7 +899,7 @@
  *   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 @@
  * 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;
Index: rational.c
===================================================================
--- rational.c	(revision 35880)
+++ rational.c	(revision 35881)
@@ -1601,15 +1601,12 @@
 }
 
 #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 @@
 }
 
 #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
 

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]