diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-05-11 16:45:40 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-05-11 16:47:25 +0900 |
commit | 15e977349e31389515bccf7a9684005a0c36e02d (patch) | |
tree | bb4a8289699a540af59d03b5329ef8f3f4230a46 /vm_insnhelper.c | |
parent | 4fbb34415659d33b479973e1fdbc71314bd810eb (diff) | |
download | ruby-15e977349e31389515bccf7a9684005a0c36e02d.tar.gz |
more on NULL versus functions
Function pointers are not void*. See also
115fec062ccf7c6d72c8d5f64b7a5d84c9fb2dd8
ce4ea956d24eab5089a143bba38126f2b11b55b6
8427fca49bd85205f5a8766292dd893f003c0e48
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r-- | vm_insnhelper.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c index b350e81985..4d1d4ea0f9 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -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); } @@ -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); } @@ -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); @@ -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); } |