summaryrefslogtreecommitdiff
path: root/process.c
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-21 12:18:40 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-06-21 12:18:40 +0000
commited8040a62b9cd77d9c218eed0b993d4aa15eddc0 (patch)
treeef3c0424dab9669fe83d367d79db3034a74fa912 /process.c
parent511e25b2d597c86667a170b186e414cdd246acb6 (diff)
downloadruby-ed8040a62b9cd77d9c218eed0b993d4aa15eddc0.tar.gz
* process.c (rb_execarg_addopt): take a VALUE argument instead of
struct rb_execarg. (rb_exec_arg_addopt): follow the rb_execarg_addopt change. (check_exec_options_i): ditto. * io.c (pipe_open): follow the rb_execarg_addopt change. * internal.h (rb_execarg_addopt): follow the definition change. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'process.c')
-rw-r--r--process.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/process.c b/process.c
index e91a7528d0..daf5eb6172 100644
--- a/process.c
+++ b/process.c
@@ -1542,8 +1542,10 @@ static int rlimit_type_by_lname(const char *name);
#endif
int
-rb_execarg_addopt(struct rb_execarg *e, VALUE key, VALUE val)
+rb_execarg_addopt(VALUE execarg_obj, VALUE key, VALUE val)
{
+ struct rb_execarg *e = rb_execarg_get(execarg_obj);
+
VALUE options = e->options;
ID id;
#if defined(HAVE_SETRLIMIT) && defined(NUM2RLIM)
@@ -1673,13 +1675,14 @@ redirect:
rb_raise(rb_eArgError, "wrong exec option");
}
+ RB_GC_GUARD(execarg_obj);
return ST_CONTINUE;
}
int
rb_exec_arg_addopt(struct rb_exec_arg *e, VALUE key, VALUE val)
{
- return rb_execarg_addopt(rb_execarg_get(e->execarg_obj), key, val);
+ return rb_execarg_addopt(e->execarg_obj, key, val);
}
static int
@@ -1688,11 +1691,7 @@ check_exec_options_i(st_data_t st_key, st_data_t st_val, st_data_t arg)
VALUE key = (VALUE)st_key;
VALUE val = (VALUE)st_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;
+ return rb_execarg_addopt(execarg_obj, key, val);
}
static VALUE