Skip to content

Commit 17e9339

Browse files
committed
1 parent 2eedaef commit 17e9339

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

_tools/ruby_h_to_go/lib/ruby_h_to_go/function_definition.rb

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,6 @@ def generate_go_content
5252

5353
go_function_lines << "func #{go_function_name}(#{go_function_args.join(", ")}) #{go_function_typeref} {"
5454

55-
call_c_method = "C.#{name}("
56-
5755
casted_go_args = []
5856
char_var_count = args.count { |c_arg| c_arg.type == "char" && c_arg.pointer == :ref }
5957
chars_var_count = args.count { |c_arg| c_arg.type == "char" && c_arg.pointer == :str_array }
@@ -69,8 +67,7 @@ def generate_go_content
6967
after_call_function_lines.push(*after_lines)
7068
end
7169

72-
call_c_method << casted_go_args.join(", ")
73-
call_c_method << ")"
70+
call_c_method = "C.#{name}(#{casted_go_args.join(", ")})"
7471

7572
go_function_lines.push(*before_call_function_lines)
7673
cast_func = typeref.cast_func_for_function_return

0 commit comments

Comments
 (0)