Skip to content

Commit ad4a35f

Browse files
committed
Remove needless logic
1 parent 672deb8 commit ad4a35f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

_tools/ruby_h_to_go/lib/ruby_h_to_go/generator_helper.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ def ruby_c_type_to_go_type(typename, pos: nil, pointer: nil, pointer_length: 0)
5656
return "Longlong"
5757
when "unsigned long long"
5858
return "Ulonglong"
59-
when /^VALUE\s*\(\*func\)\s*\(ANYARGS\)$/, "RUBY_DATA_FUNC", "rb_alloc_func_t"
59+
when "RUBY_DATA_FUNC", "rb_alloc_func_t"
6060
return "unsafe.Pointer"
6161
when /^[A-Z]+$/, "int"
6262
# e.g. VALUE
@@ -95,7 +95,7 @@ def cast_to_cgo_type(typename)
9595
return "C.enum_ruby_value_type"
9696
when "rb_io_wait_readwrite"
9797
return "C.enum_rb_io_wait_readwrite"
98-
when /^VALUE\s*\(\*func\)\s*\(ANYARGS\)$/, "RUBY_DATA_FUNC"
98+
when "RUBY_DATA_FUNC"
9999
return "toCFunctionPointer"
100100
end
101101

0 commit comments

Comments
 (0)