1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

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
This commit is contained in:
normal 2018-12-03 09:15:16 +00:00
parent 323ddfc168
commit f8c15d0bc7
2 changed files with 11 additions and 12 deletions

View file

@ -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);

View file

@ -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)
{