[前][次][番号順一覧][スレッド一覧]

ruby-changes:53937

From: normal <ko1@a...>
Date: Mon, 3 Dec 2018 18:15:21 +0900 (JST)
Subject: [ruby-changes:53937] normal:r66157 (trunk): process.c (rb_execarg_init): mark as static

normal	2018-12-03 18:15:16 +0900 (Mon, 03 Dec 2018)

  New Revision: 66157

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=66157

  Log:
    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.

  Modified files:
    trunk/internal.h
    trunk/process.c
Index: internal.h
===================================================================
--- internal.h	(revision 66156)
+++ internal.h	(revision 66157)
@@ -2298,7 +2298,6 @@ int rb_exec_async_signal_safe(const stru https://github.com/ruby/ruby/blob/trunk/internal.h#L2298
 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);
Index: process.c
===================================================================
--- process.c	(revision 66156)
+++ process.c	(revision 66157)
@@ -2582,16 +2582,6 @@ rb_exec_fillarg(VALUE prog, int argc, VA https://github.com/ruby/ruby/blob/trunk/process.c#L2582
     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) https://github.com/ruby/ruby/blob/trunk/process.c#L2590
     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 *o https://github.com/ruby/ruby/blob/trunk/process.c#L2614
     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)
 {

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]