eval_intern.h: pass_passed_block
* eval_intern.h (pass_passed_block): make helper inline function. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52039 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
57149f76eb
commit
8b4cf7b708
@ -4,15 +4,14 @@
|
|||||||
#include "ruby/ruby.h"
|
#include "ruby/ruby.h"
|
||||||
#include "vm_core.h"
|
#include "vm_core.h"
|
||||||
|
|
||||||
#define PASS_PASSED_BLOCK_TH(th) do { \
|
static inline void
|
||||||
(th)->passed_block = rb_vm_control_frame_block_ptr(th->cfp); \
|
pass_passed_block(rb_thread_t *th)
|
||||||
(th)->cfp->flag |= VM_FRAME_FLAG_PASSED; \
|
{
|
||||||
} while (0)
|
th->passed_block = rb_vm_control_frame_block_ptr(th->cfp);
|
||||||
|
th->cfp->flag |= VM_FRAME_FLAG_PASSED;
|
||||||
#define PASS_PASSED_BLOCK() do { \
|
}
|
||||||
rb_thread_t * const __th__ = GET_THREAD(); \
|
#define PASS_PASSED_BLOCK_TH(th) pass_passed_block(th)
|
||||||
PASS_PASSED_BLOCK_TH(__th__); \
|
#define PASS_PASSED_BLOCK() pass_passed_block(GET_THREAD())
|
||||||
} while (0)
|
|
||||||
|
|
||||||
#ifdef HAVE_STDLIB_H
|
#ifdef HAVE_STDLIB_H
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
@ -859,7 +859,7 @@ rb_funcallv_public(VALUE recv, ID mid, int argc, const VALUE *argv)
|
|||||||
VALUE
|
VALUE
|
||||||
rb_funcall_passing_block(VALUE recv, ID mid, int argc, const VALUE *argv)
|
rb_funcall_passing_block(VALUE recv, ID mid, int argc, const VALUE *argv)
|
||||||
{
|
{
|
||||||
PASS_PASSED_BLOCK_TH(GET_THREAD());
|
PASS_PASSED_BLOCK();
|
||||||
|
|
||||||
return rb_call(recv, mid, argc, argv, CALL_PUBLIC);
|
return rb_call(recv, mid, argc, argv, CALL_PUBLIC);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user