diff options
author | Jeremy Evans <code@jeremyevans.net> | 2019-09-29 17:47:17 -0700 |
---|---|---|
committer | Jeremy Evans <code@jeremyevans.net> | 2019-09-29 18:31:08 -0700 |
commit | 649a64ae29318501472f74798a12eb60871ab990 (patch) | |
tree | 8295ea066c04d326bb7462a4f7569d60d393c5b4 /include | |
parent | fba8627dc1c5b191713edeb5fc21cbe0ddde9e3c (diff) | |
download | ruby-649a64ae29318501472f74798a12eb60871ab990.tar.gz |
Add three more C-API functions for handling keywords
This adds rb_funcall_passing_block_kw, rb_funcallv_public_kw,
and rb_yield_splat_kw. This functions are necessary to easily
handle cases where rb_funcall_passing_block, rb_funcallv_public,
and rb_yield_splat are currently used and a keyword argument
separation warning is raised.
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/ruby.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h index ca238dda64..2ec0cc84ae 100644 --- a/include/ruby/ruby.h +++ b/include/ruby/ruby.h @@ -1893,9 +1893,11 @@ VALUE rb_funcall(VALUE, ID, int, ...); VALUE rb_funcallv(VALUE, ID, int, const VALUE*); VALUE rb_funcallv_kw(VALUE, ID, int, const VALUE*, int); VALUE rb_funcallv_public(VALUE, ID, int, const VALUE*); +VALUE rb_funcallv_public_kw(VALUE, ID, int, const VALUE*, int); #define rb_funcall2 rb_funcallv #define rb_funcall3 rb_funcallv_public VALUE rb_funcall_passing_block(VALUE, ID, int, const VALUE*); +VALUE rb_funcall_passing_block_kw(VALUE, ID, int, const VALUE*, int); VALUE rb_funcall_with_block(VALUE, ID, int, const VALUE*, VALUE); VALUE rb_funcall_with_block_kw(VALUE, ID, int, const VALUE*, VALUE, int); int rb_scan_args(int, const VALUE*, const char*, ...); @@ -1972,6 +1974,7 @@ VALUE rb_yield_values(int n, ...); VALUE rb_yield_values2(int n, const VALUE *argv); VALUE rb_yield_values_kw(int n, const VALUE *argv, int kw_splat); VALUE rb_yield_splat(VALUE); +VALUE rb_yield_splat_kw(VALUE, int); VALUE rb_yield_block(RB_BLOCK_CALL_FUNC_ARGLIST(yielded_arg, callback_arg)); /* rb_block_call_func */ #define RB_NO_KEYWORDS 0 #define RB_PASS_KEYWORDS 1 |