Skip to content

Commit 254b435

Browse files
committed
Support VALUE* in script
1 parent 74da8bb commit 254b435

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

_scripts/dump_ruby_c_functions.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -186,6 +186,8 @@ def cast_to_cgo_type(typename)
186186
return "C.uint"
187187
when "char*"
188188
return "string2Char"
189+
when "VALUE*"
190+
return "toCValueArray"
189191
when /^VALUE\s*\(\*func\)\s*\(ANYARGS\)$/
190192
return "toFunctionPointer"
191193
end
@@ -202,6 +204,8 @@ def ruby_c_type_to_go_type(typename)
202204
return "uint"
203205
when "char*", "const char*"
204206
return "string"
207+
when "VALUE*"
208+
return "[]VALUE"
205209
when /^VALUE\s*\(\*func\)\s*\(ANYARGS\)$/
206210
return "unsafe.Pointer"
207211
when /^[A-Z]+$/, "int"

0 commit comments

Comments
 (0)