Skip to content

Commit

Permalink
codegen: generate functions with void* return type correctly (sometim…
Browse files Browse the repository at this point in the history
…es this fact was skipped)
  • Loading branch information
gucio321 committed Feb 17, 2024
1 parent d43c3d9 commit 942ee40
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/codegen/gencpp.go
Original file line number Diff line number Diff line change
Expand Up @@ -369,7 +369,7 @@ extern "C" {
// cppSb.WriteString(fmt.Sprintf("// %#v\n", f))

// if needed, write extra stuff to cpp headers
if string(f.AllCallArgs) == actualCallArgsStr {
if string(f.AllCallArgs) == actualCallArgsStr && ret == f.Ret {
cWrapperFuncName = f.FuncName
} else if f.Constructor {
headerSb.WriteString(fmt.Sprintf("extern %s* %s%s;\n", f.StName, cWrapperFuncName, f.Args))
Expand Down

0 comments on commit 942ee40

Please sign in to comment.