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

ruby-changes:24115

From: akr <ko1@a...>
Date: Thu, 21 Jun 2012 20:36:40 +0900 (JST)
Subject: [ruby-changes:24115] akr:r36166 (trunk): * process.c (rb_exec_fillarg): take a VALUE argument instead of

akr	2012-06-21 20:36:25 +0900 (Thu, 21 Jun 2012)

  New Revision: 36166

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

  Log:
    * process.c (rb_exec_fillarg): take a VALUE argument instead of
      struct rb_execarg.
      (rb_check_exec_options): ditto.
      (check_exec_options_i): ditto.

  Modified files:
    trunk/ChangeLog
    trunk/process.c

Index: ChangeLog
===================================================================
--- ChangeLog	(revision 36165)
+++ ChangeLog	(revision 36166)
@@ -1,3 +1,11 @@
+Thu Jun 21 20:34:19 2012  Tanaka Akira  <akr@f...>
+
+	* process.c (rb_exec_fillarg): take a VALUE argument instead of
+	  struct rb_execarg.
+	  (rb_check_exec_options): ditto.
+	  (check_exec_options_i): ditto.
+
+	the third argument 
 Thu Jun 21 19:48:05 2012  Tanaka Akira  <akr@f...>
 
 	* process.c (rb_exec_async_signal_safe): use rb_execarg_run_options
Index: process.c
===================================================================
--- process.c	(revision 36165)
+++ process.c	(revision 36166)
@@ -1687,8 +1687,12 @@
 {
     VALUE key = (VALUE)st_key;
     VALUE val = (VALUE)st_val;
-    struct rb_execarg *e = (struct rb_execarg *)arg;
-    return rb_execarg_addopt(e, key, val);
+    VALUE execarg_obj = (VALUE)arg;
+    struct rb_execarg *e = rb_execarg_get(execarg_obj);
+    int ret;
+    ret = rb_execarg_addopt(e, key, val);
+    RB_GC_GUARD(execarg_obj);
+    return ret;
 }
 
 static VALUE
@@ -1763,11 +1767,11 @@
 }
 
 static void
-rb_check_exec_options(VALUE opthash, struct rb_execarg *e)
+rb_check_exec_options(VALUE opthash, VALUE execarg_obj)
 {
     if (RHASH_EMPTY_P(opthash))
         return;
-    st_foreach(RHASH_TBL(opthash), check_exec_options_i, (st_data_t)e);
+    st_foreach(RHASH_TBL(opthash), check_exec_options_i, (st_data_t)execarg_obj);
 }
 
 static int
@@ -1892,7 +1896,7 @@
     e->options = options;
 
     if (!NIL_P(opthash)) {
-        rb_check_exec_options(opthash, e);
+        rb_check_exec_options(opthash, execarg_obj);
     }
     if (!NIL_P(env)) {
         env = rb_check_exec_env(env);

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

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