Skip to content

Commit 10decfe

Browse files
committed
Fixed cannot use (_Cgo_ptr(_Cfpvar_fp_go_struct_alloc)) (value of type unsafe.Pointer) as ruby.RbAllocFuncT value in argument to ruby.RbDefineAllocFunc
1 parent 613c217 commit 10decfe

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

_tools/ruby_h_to_go/lib/ruby_h_to_go/generator_helper.rb

Lines changed: 1 addition & 1 deletion
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"
59+
when /^VALUE\s*\(\*func\)\s*\(ANYARGS\)$/, "RUBY_DATA_FUNC", "rb_alloc_func_t"
6060
return "unsafe.Pointer"
6161
when /^[A-Z]+$/, "int"
6262
# e.g. VALUE

ruby/function_generated.go

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)