summaryrefslogtreecommitdiffstats
path: root/include/ruby
diff options
context:
space:
mode:
authormame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-09 15:52:51 +0000
committermame <mame@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2008-06-09 15:52:51 +0000
commit241a6137c4e8d8d423269b8d62a6fd278b1f1128 (patch)
treecd89b99c576f1f74416395d00aecf3ab06fbe55c /include/ruby
parent8d4ed82ad3917fdaa1751a1e4dabd98a273f71fe (diff)
downloadruby-241a6137c4e8d8d423269b8d62a6fd278b1f1128.tar.gz
ruby-241a6137c4e8d8d423269b8d62a6fd278b1f1128.tar.xz
ruby-241a6137c4e8d8d423269b8d62a6fd278b1f1128.zip
* include/ruby/ruby.h, vm_core.h: add a type rb_blockptr.
* vm_insnhelper.c (vm_yield_with_cfunc): vm_yield_with_cfunc receives blockptr and passes it to iterating block. * proc.c (rb_proc_call), include/ruby/intern.h: rb_proc_call receives blockptr. "rb_proc_call(self, args, blockptr)" in C corresponds to "self.call(*args, &block)" in Ruby. * proc.c (proc_call): pass blockptr to block that is written in C. * proc.c (curry): receive blockptr and pass it to original proc. [ruby-core:15551] * vm.c (invoke_block_from_c): fix for change of vm_yield_with_cfunc. * thread.c (call_trace_proc), eval_jump.c (rb_call_end_proc): fix for change of rb_proc_call. git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@17065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'include/ruby')
-rw-r--r--include/ruby/intern.h2
-rw-r--r--include/ruby/ruby.h2
2 files changed, 3 insertions, 1 deletions
diff --git a/include/ruby/intern.h b/include/ruby/intern.h
index 5c5cfd1b8..bbaa5acaa 100644
--- a/include/ruby/intern.h
+++ b/include/ruby/intern.h
@@ -270,7 +270,7 @@ VALUE rb_class_new_instance(int, VALUE*, VALUE);
VALUE rb_block_proc(void);
VALUE rb_f_lambda(void);
VALUE rb_proc_new(VALUE (*)(ANYARGS/* VALUE yieldarg[, VALUE procarg] */), VALUE);
-VALUE rb_proc_call(VALUE, VALUE);
+VALUE rb_proc_call(VALUE, VALUE, rb_blockptr);
int rb_proc_arity(VALUE);
VALUE rb_binding_new(void);
VALUE rb_obj_method(VALUE, VALUE);
diff --git a/include/ruby/ruby.h b/include/ruby/ruby.h
index 99321f193..d51718023 100644
--- a/include/ruby/ruby.h
+++ b/include/ruby/ruby.h
@@ -824,6 +824,8 @@ PRINTF_ARGS(void rb_sys_warning(const char*, ...), 1, 2);
PRINTF_ARGS(void rb_warn(const char*, ...), 1, 2);
PRINTF_ARGS(void rb_compile_warn(const char *, int, const char*, ...), 3, 4);
+typedef struct rb_block_struct *rb_blockptr;
+
typedef VALUE rb_block_call_func(VALUE, VALUE, int, VALUE*);
VALUE rb_each(VALUE);