diff options
author | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-03 09:15:16 +0000 |
---|---|---|
committer | normal <normal@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2018-12-03 09:15:16 +0000 |
commit | f8c15d0bc722ada9f5dea1617b4963c10061b10b (patch) | |
tree | aef8342783f7614fa7c1cbd43cbf7b379e8c548a | |
parent | 323ddfc168e00ab17738a08f9a91c8b02dd8e6c3 (diff) | |
download | ruby-f8c15d0bc722ada9f5dea1617b4963c10061b10b.tar.gz |
process.c (rb_execarg_init): mark as static
io.c has not used it since r36229, and we can re-export
it if we need it at another time.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66157 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r-- | internal.h | 1 | ||||
-rw-r--r-- | process.c | 22 |
2 files changed, 11 insertions, 12 deletions
diff --git a/internal.h b/internal.h index 8f69c6f1da..968c4b5ecb 100644 --- a/internal.h +++ b/internal.h @@ -2298,7 +2298,6 @@ int rb_exec_async_signal_safe(const struct rb_execarg *e, char *errmsg, size_t e rb_pid_t rb_fork_async_signal_safe(int *status, int (*chfunc)(void*, char *, size_t), void *charg, VALUE fds, char *errmsg, size_t errmsg_buflen); VALUE rb_execarg_new(int argc, const VALUE *argv, int accept_shell, int allow_exc_opt); struct rb_execarg *rb_execarg_get(VALUE execarg_obj); /* dangerous. needs GC guard. */ -VALUE rb_execarg_init(int argc, const VALUE *argv, int accept_shell, VALUE execarg_obj, int allow_exc_opt); int rb_execarg_addopt(VALUE execarg_obj, VALUE key, VALUE val); void rb_execarg_parent_start(VALUE execarg_obj); void rb_execarg_parent_end(VALUE execarg_obj); @@ -2582,16 +2582,6 @@ rb_exec_fillarg(VALUE prog, int argc, VALUE *argv, VALUE env, VALUE opthash, VAL RB_GC_GUARD(execarg_obj); } -VALUE -rb_execarg_new(int argc, const VALUE *argv, int accept_shell, int allow_exc_opt) -{ - VALUE execarg_obj; - struct rb_execarg *eargp; - execarg_obj = TypedData_Make_Struct(0, struct rb_execarg, &exec_arg_data_type, eargp); - rb_execarg_init(argc, argv, accept_shell, execarg_obj, allow_exc_opt); - return execarg_obj; -} - struct rb_execarg * rb_execarg_get(VALUE execarg_obj) { @@ -2600,7 +2590,7 @@ rb_execarg_get(VALUE execarg_obj) return eargp; } -VALUE +static VALUE rb_execarg_init(int argc, const VALUE *orig_argv, int accept_shell, VALUE execarg_obj, int allow_exc_opt) { struct rb_execarg *eargp = rb_execarg_get(execarg_obj); @@ -2624,6 +2614,16 @@ rb_execarg_init(int argc, const VALUE *orig_argv, int accept_shell, VALUE execar return ret; } +VALUE +rb_execarg_new(int argc, const VALUE *argv, int accept_shell, int allow_exc_opt) +{ + VALUE execarg_obj; + struct rb_execarg *eargp; + execarg_obj = TypedData_Make_Struct(0, struct rb_execarg, &exec_arg_data_type, eargp); + rb_execarg_init(argc, argv, accept_shell, execarg_obj, allow_exc_opt); + return execarg_obj; +} + void rb_execarg_setenv(VALUE execarg_obj, VALUE env) { |