aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJeremy Evans <code@jeremyevans.net>2019-09-03 14:49:03 -0700
committerJeremy Evans <code@jeremyevans.net>2019-09-05 17:47:12 -0700
commit7fc874bf4cbdd87b3d6fe05dc5959175f3fe94b8 (patch)
tree27580932f0b126936b3f4fd3c6a6998727c29ce6 /include
parente3cb3e11af4323aba002a84044375180dd24248c (diff)
downloadruby-7fc874bf4cbdd87b3d6fe05dc5959175f3fe94b8.tar.gz
Add rb_funcall_with_block_kw
This is needed for C functions to call methods with keyword arguments. This is a copy of rb_funcall_with_block with an extra argument for the keyword flag. There isn't a clean way to implement this that doesn't involve changing a lot of function signatures, because rb_call doesn't support a way to mark that the call has keyword arguments. So hack this in using a CALL_PUBLIC_KW call_type, which we switch for CALL_PUBLIC later in the call stack. We do need to modify rm_vm_call0 to take an argument for whether keyword arguments are used, since the call_type is no longer available at that point. Use the passed in value to set the appropriate keyword flag in both calling and ci_entry.
Diffstat (limited to 'include')
-rw-r--r--include/ruby/ruby.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 947b3d44b8..893bd2b0b0 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -1892,6 +1892,7 @@ VALUE rb_funcallv_public(VALUE, ID, int, const VALUE*);
#define rb_funcall3 rb_funcallv_public
VALUE rb_funcall_passing_block(VALUE, ID, int, const VALUE*);
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*, ...);
VALUE rb_call_super(int, const VALUE*);
VALUE rb_current_receiver(void);