diff options
author | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-21 10:03:23 +0000 |
---|---|---|
committer | akr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2012-06-21 10:03:23 +0000 |
commit | 0a431f6903c6dcf60353e6831d4efa1d2176e67d (patch) | |
tree | d388bd79e8e826d67dfbb24ba1ccdcfdf353ac01 | |
parent | 129cad739b2655f638e04aac11b6e648b5ecb5f8 (diff) | |
download | ruby-0a431f6903c6dcf60353e6831d4efa1d2176e67d.tar.gz |
* process.c (rb_exec_fillarg): take a VALUE argument instead of
struct rb_execarg.
(rb_execarg_init): follow the rb_exec_fillarg change.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36164 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | process.c | 6 |
2 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,9 @@ +Thu Jun 21 19:02:43 2012 Tanaka Akira <akr@fsij.org> + + * process.c (rb_exec_fillarg): take a VALUE argument instead of + struct rb_execarg. + (rb_execarg_init): follow the rb_exec_fillarg change. + Thu Jun 21 18:36:43 2012 Tanaka Akira <akr@fsij.org> * process.c (rb_execarg_init): take a VALUE argument instead of @@ -1881,8 +1881,9 @@ compare_posix_sh(const void *key, const void *el) #endif static void -rb_exec_fillarg(VALUE prog, int argc, VALUE *argv, VALUE env, VALUE opthash, struct rb_execarg *e) +rb_exec_fillarg(VALUE prog, int argc, VALUE *argv, VALUE env, VALUE opthash, VALUE execarg_obj) { + struct rb_execarg *e = rb_execarg_get(execarg_obj); VALUE options; char fbuf[MAXPATHLEN]; @@ -2050,6 +2051,7 @@ rb_exec_fillarg(VALUE prog, int argc, VALUE *argv, VALUE env, VALUE opthash, str rb_str_buf_cat(argv_str, (char *)&null, sizeof(null)); /* terminator for execve. */ e->invoke.cmd.argv_str = argv_str; } + RB_GC_GUARD(execarg_obj); } VALUE @@ -2077,7 +2079,7 @@ rb_execarg_init(int argc, VALUE *argv, int accept_shell, VALUE execarg_obj) VALUE prog, ret; VALUE env = Qnil, opthash = Qnil; prog = rb_exec_getargs(&argc, &argv, accept_shell, &env, &opthash); - rb_exec_fillarg(prog, argc, argv, env, opthash, e); + rb_exec_fillarg(prog, argc, argv, env, opthash, execarg_obj); ret = e->use_shell ? e->invoke.sh.shell_script : e->invoke.cmd.command_name; RB_GC_GUARD(execarg_obj); return ret; |