aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-09-26 09:09:30 -0700
committerJeremy Evans <code@jeremyevans.net>2019-09-26 15:30:51 -0700
commitdd2068ac8d4016f43c1f3cc1aa81decb504db5b6 (patch)
tree50bb60942f3edb40128c7985264c5b2f3aa58838
parent31339ef4f2af9c7dad2a81eaa9470ee4574181a0 (diff)
downloadruby-dd2068ac8d4016f43c1f3cc1aa81decb504db5b6.tar.gz
Add rb_adjust_argv_kw_splat to internal.h
We are calling this in a few other files, it is better to have it in a header than adding prototypes to the other files.
-rw-r--r--cont.c1
-rw-r--r--internal.h1
-rw-r--r--proc.c2
-rw-r--r--thread.c2
-rw-r--r--vm_args.c1
5 files changed, 1 insertions, 6 deletions
diff --git a/cont.c b/cont.c
index fe2bcb6292..61f42b386f 100644
--- a/cont.c
+++ b/cont.c
@@ -1779,7 +1779,6 @@ rb_fiber_new(rb_block_call_func_t func, VALUE obj)
static void rb_fiber_terminate(rb_fiber_t *fiber, int need_interrupt);
#define PASS_KW_SPLAT (rb_empty_keyword_given_p() ? RB_PASS_EMPTY_KEYWORDS : rb_keyword_given_p())
-extern VALUE rb_adjust_argv_kw_splat(int *argc, const VALUE **argv, int *kw_splat);
void
rb_fiber_start(void)
diff --git a/internal.h b/internal.h
index 7de0077d86..2346703d68 100644
--- a/internal.h
+++ b/internal.h
@@ -2294,6 +2294,7 @@ void rb_print_backtrace(void);
/* vm_eval.c */
void Init_vm_eval(void);
+VALUE rb_adjust_argv_kw_splat(int *, const VALUE **, int *);
VALUE rb_current_realfilepath(void);
VALUE rb_check_block_call(VALUE, ID, int, const VALUE *, rb_block_call_func_t, VALUE);
typedef void rb_check_funcall_hook(int, VALUE, ID, int, const VALUE *, VALUE);
diff --git a/proc.c b/proc.c
index 91f58785d9..f03e470151 100644
--- a/proc.c
+++ b/proc.c
@@ -954,8 +954,6 @@ proc_to_block_handler(VALUE procval)
return NIL_P(procval) ? VM_BLOCK_HANDLER_NONE : procval;
}
-extern VALUE rb_adjust_argv_kw_splat(int *argc, const VALUE **argv, int *kw_splat);
-
VALUE
rb_proc_call_with_block_kw(VALUE self, int argc, const VALUE *argv, VALUE passed_procval, int kw_splat)
{
diff --git a/thread.c b/thread.c
index 9301e41696..901667e1b3 100644
--- a/thread.c
+++ b/thread.c
@@ -662,8 +662,6 @@ rb_vm_proc_local_ep(VALUE proc)
}
}
-extern VALUE rb_adjust_argv_kw_splat(int *argc, const VALUE **argv, int *kw_splat);
-
static void
thread_do_start(rb_thread_t *th)
{
diff --git a/vm_args.c b/vm_args.c
index d128f91fbc..f0bc7a82e9 100644
--- a/vm_args.c
+++ b/vm_args.c
@@ -14,7 +14,6 @@ NORETURN(static void argument_kw_error(rb_execution_context_t *ec, const rb_iseq
VALUE rb_keyword_error_new(const char *error, VALUE keys); /* class.c */
static VALUE method_missing(VALUE obj, ID id, int argc, const VALUE *argv,
enum method_missing_reason call_status, int kw_splat);
-extern VALUE rb_adjust_argv_kw_splat(int *argc, const VALUE **argv, int *kw_splat);
struct args_info {
/* basic args info */