File tree Expand file tree Collapse file tree 1 file changed +13
-8
lines changed
_tools/ruby_h_to_go/lib/ruby_h_to_go Expand file tree Collapse file tree 1 file changed +13
-8
lines changed Original file line number Diff line number Diff line change @@ -36,14 +36,7 @@ def write_go_file(dist_dir)
36
36
37
37
# @return [String]
38
38
def generate_go_content
39
- go_function_lines = [
40
- "// #{ go_function_name } calls `#{ name } ` in C" ,
41
- "//" ,
42
- "// Original definition is following" ,
43
- "//" ,
44
- "//\t #{ definition } " ,
45
- "func #{ go_function_name } (#{ args . map ( &:go_function_arg ) . join ( ", " ) } ) #{ typeref . go_function_typeref } {" ,
46
- ]
39
+ go_function_lines = generate_function_header_lines
47
40
48
41
casted_go_args , before_call_function_lines , after_call_function_lines = analyze_args
49
42
@@ -65,6 +58,18 @@ def go_function_name
65
58
66
59
private
67
60
61
+ # @return [Array<String>]
62
+ def generate_function_header_lines
63
+ [
64
+ "// #{ go_function_name } calls `#{ name } ` in C" ,
65
+ "//" ,
66
+ "// Original definition is following" ,
67
+ "//" ,
68
+ "//\t #{ definition } " ,
69
+ "func #{ go_function_name } (#{ args . map ( &:go_function_arg ) . join ( ", " ) } ) #{ typeref . go_function_typeref } {" ,
70
+ ]
71
+ end
72
+
68
73
# @return [Array<Array<String>, Array<String>, Array<String>>]
69
74
# - casted_go_args [Array<String>]
70
75
# - before_call_function_lines [Array<String>]
You can’t perform that action at this time.
0 commit comments