mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
constify rb_vm_bh_to_procval()
* vm_insnhelper.c (rb_vm_bh_to_procval): constify 1st param (ec). * vm_args.c (args_setup_block_parameter): accepts (const) `ec`. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@60559 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c7c173a618
commit
6d5636cdac
3 changed files with 5 additions and 5 deletions
|
@ -474,10 +474,10 @@ args_setup_kw_rest_parameter(VALUE keyword_hash, VALUE *locals)
|
|||
}
|
||||
|
||||
static inline void
|
||||
args_setup_block_parameter(rb_thread_t *th, struct rb_calling_info *calling, VALUE *locals)
|
||||
args_setup_block_parameter(const rb_execution_context_t *ec, struct rb_calling_info *calling, VALUE *locals)
|
||||
{
|
||||
VALUE block_handler = calling->block_handler;
|
||||
*locals = rb_vm_bh_to_procval(th->ec, block_handler);
|
||||
*locals = rb_vm_bh_to_procval(ec, block_handler);
|
||||
}
|
||||
|
||||
struct fill_values_arg {
|
||||
|
@ -670,7 +670,7 @@ setup_parameters_complex(rb_execution_context_t * const ec, const rb_iseq_t * co
|
|||
/* Do nothing */
|
||||
}
|
||||
else {
|
||||
args_setup_block_parameter(rb_ec_thread_ptr(ec), calling, locals + iseq->body->param.block_start);
|
||||
args_setup_block_parameter(ec, calling, locals + iseq->body->param.block_start);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1550,7 +1550,7 @@ void rb_vm_stack_to_heap(rb_execution_context_t *ec);
|
|||
void ruby_thread_init_stack(rb_thread_t *th);
|
||||
int rb_vm_control_frame_id_and_class(const rb_control_frame_t *cfp, ID *idp, ID *called_idp, VALUE *klassp);
|
||||
void rb_vm_rewind_cfp(rb_execution_context_t *ec, rb_control_frame_t *cfp);
|
||||
VALUE rb_vm_bh_to_procval(rb_execution_context_t *ec, VALUE block_handler);
|
||||
VALUE rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler);
|
||||
|
||||
void rb_vm_register_special_exception_str(enum ruby_special_exceptions sp, VALUE exception_class, VALUE mesg);
|
||||
|
||||
|
|
|
@ -345,7 +345,7 @@ rb_vm_env_write(const VALUE *ep, int index, VALUE v)
|
|||
}
|
||||
|
||||
VALUE
|
||||
rb_vm_bh_to_procval(rb_execution_context_t *ec, VALUE block_handler)
|
||||
rb_vm_bh_to_procval(const rb_execution_context_t *ec, VALUE block_handler)
|
||||
{
|
||||
if (block_handler == VM_BLOCK_HANDLER_NONE) {
|
||||
return Qnil;
|
||||
|
|
Loading…
Reference in a new issue