diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-21 12:18:40 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-21 12:18:40 +0000 |
commit | ed8040a62b9cd77d9c218eed0b993d4aa15eddc0 (patch) | |
tree | ef3c0424dab9669fe83d367d79db3034a74fa912 /process.c | |
parent | 511e25b2d597c86667a170b186e414cdd246acb6 (diff) | |
download | ruby-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.c | 13 |
1 files changed, 6 insertions, 7 deletions
@@ -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 |