genbindings: fixes for functions returning void*

This commit is contained in:
mappu 2024-08-10 10:35:40 +12:00
parent d0c627e7a5
commit 6a44b59b52
2 changed files with 2 additions and 2 deletions

View File

@ -206,7 +206,7 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) {
shouldReturn := "return "
afterCall := ""
if m.ReturnType.ParameterType == "void" {
if m.ReturnType.ParameterType == "void" && !m.ReturnType.Pointer {
shouldReturn = ""
} else if m.ReturnType.ParameterType == "QString" {

View File

@ -125,7 +125,7 @@ import "C"
afterword := ""
returnTypeDecl := m.ReturnType.ParameterType // FIXME handle byRef/const here too
if m.ReturnType.ParameterType == "void" {
if m.ReturnType.ParameterType == "void" && !m.ReturnType.Pointer {
shouldReturn = ""
returnTypeDecl = ""