genbindings: misc

This commit is contained in:
mappu 2024-08-15 19:51:31 +12:00
parent 5db5c98bc3
commit 7b86a20386
2 changed files with 1 additions and 3 deletions

View File

@ -62,7 +62,7 @@ func clangStripUpToFile(stdout io.Reader, inputFilePath string) ([]interface{},
var obj = map[string]interface{}{}
err := json.NewDecoder(stdout).Decode(&obj)
if err != nil {
return nil, err
return nil, fmt.Errorf("json.Decode: %v", err)
}
inner, ok := obj["inner"].([]interface{})

View File

@ -398,8 +398,6 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) {
} else if m.ReturnType.QtClassType() && !m.ReturnType.Pointer {
shouldReturn = m.ReturnType.ParameterType + " ret = "
// afterCall = "\t// Copy-construct value returned type into Go-allocated POCO\n"
// afterCall += "\t_*out = ret;\n"
afterCall = "\t// Copy-construct value returned type into heap-allocated copy\n"
afterCall += "\treturn static_cast<" + m.ReturnType.ParameterType + "*>(new " + m.ReturnType.ParameterType + "(ret));\n"