Skip to content

Commit

Permalink
more on NULL versus functions
Browse files Browse the repository at this point in the history
Function pointers are not void*.  See also
115fec0
ce4ea95
8427fca
  • Loading branch information
shyouhei committed May 11, 2020
1 parent 4fbb344 commit 15e9773
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion gc.c
Expand Up @@ -8228,7 +8228,7 @@ update_cc_tbl(rb_objspace_t *objspace, VALUE klass)
{
struct rb_id_table *tbl = RCLASS_CC_TBL(klass);
if (tbl) {
rb_id_table_foreach_with_replace(tbl, update_cc_tbl_i, NULL, objspace);
rb_id_table_foreach_with_replace(tbl, update_cc_tbl_i, 0, objspace);
}
}

Expand Down
8 changes: 4 additions & 4 deletions vm_insnhelper.c
Expand Up @@ -2674,7 +2674,7 @@ vm_call_alias(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_cal
struct rb_callcache cc_body;
struct rb_call_data cd_body = {
.ci = cd->ci,
.cc = vm_cc_fill(&cc_body, Qundef, cme, NULL),
.cc = vm_cc_fill(&cc_body, Qundef, cme, 0),
};
return vm_call_method_each_type(ec, cfp, calling, &cd_body);
}
Expand Down Expand Up @@ -2738,7 +2738,7 @@ vm_call_opt_send(rb_execution_context_t *ec, rb_control_frame_t *reg_cfp, struct
cd.cc = vm_cc_fill(&cc_body,
Qundef,
rb_callable_method_entry_with_refinements(CLASS_OF(calling->recv), mid, NULL),
NULL);
0);
if (missing_reason != 0) vm_cc_method_missing_reason_set(cd.cc, missing_reason);
return vm_call_method(ec, reg_cfp, calling, (CALL_DATA)&cd);
}
Expand Down Expand Up @@ -2850,7 +2850,7 @@ vm_call_zsuper(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_ca
struct rb_callcache cc_body;
struct rb_call_data cd_body = {
.ci = cd->ci,
.cc = vm_cc_fill(&cc_body, Qundef, cme, NULL),
.cc = vm_cc_fill(&cc_body, Qundef, cme, 0),
};
return vm_call_method_each_type(ec, cfp, calling, &cd_body);

Expand Down Expand Up @@ -2964,7 +2964,7 @@ vm_call_refined(rb_execution_context_t *ec, rb_control_frame_t *cfp, struct rb_c
struct rb_callcache cc_body;
struct rb_call_data cd_body = {
.ci = cd->ci,
.cc = vm_cc_fill(&cc_body, Qundef, cme, NULL),
.cc = vm_cc_fill(&cc_body, Qundef, cme, 0),
};
return vm_call_method(ec, cfp, calling, &cd_body);
}
Expand Down

0 comments on commit 15e9773

Please sign in to comment.