diff options
author | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-06-04 13:03:13 +0900 |
---|---|---|
committer | 卜部昌平 <shyouhei@ruby-lang.org> | 2020-06-09 09:52:46 +0900 |
commit | 324038c66edc947a7738440621587575355087a4 (patch) | |
tree | 4626b50222a5c431a4a8c8f3f70c4ab09e40d7c2 /vm_eval.c | |
parent | 98d099be7e6d0251a7909dfeed10b13f453cc0f4 (diff) |
eliminate C99 compound literals
Ko1 prefers variables be assgined, instead of bare literals in function
arguments.
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/3179
Diffstat (limited to 'vm_eval.c')
-rw-r--r-- | vm_eval.c | 26 |
1 files changed, 12 insertions, 14 deletions
@@ -45,20 +45,18 @@ static VALUE vm_call0_body(rb_execution_context_t* ec, struct rb_calling_info *c MJIT_FUNC_EXPORTED VALUE rb_vm_call0(rb_execution_context_t *ec, VALUE recv, ID id, int argc, const VALUE *argv, const rb_callable_method_entry_t *me, int kw_splat) { - return vm_call0_body( - ec, - &(struct rb_calling_info) { - .block_handler = VM_BLOCK_HANDLER_NONE, - .recv = recv, - .argc = argc, - .kw_splat = kw_splat, - }, - &(struct rb_call_data) { - .ci = &VM_CI_ON_STACK(id, kw_splat ? VM_CALL_KW_SPLAT : 0, argc, NULL), - .cc = &VM_CC_ON_STACK(Qfalse, vm_call_general, { 0 }, me), - }, - argv - ); + struct rb_calling_info calling = { + .block_handler = VM_BLOCK_HANDLER_NONE, + .recv = recv, + .argc = argc, + .kw_splat = kw_splat, + }; + struct rb_call_data cd = { + .ci = &VM_CI_ON_STACK(id, kw_splat ? VM_CALL_KW_SPLAT : 0, argc, NULL), + .cc = &VM_CC_ON_STACK(Qfalse, vm_call_general, { 0 }, me), + }; + + return vm_call0_body(ec, &calling, &cd, argv); } static VALUE |