mirror of
https://github.com/mappu/miqt.git
synced 2025-01-05 07:08:39 +00:00
genbindings: misc
This commit is contained in:
parent
5db5c98bc3
commit
7b86a20386
@ -62,7 +62,7 @@ func clangStripUpToFile(stdout io.Reader, inputFilePath string) ([]interface{},
|
|||||||
var obj = map[string]interface{}{}
|
var obj = map[string]interface{}{}
|
||||||
err := json.NewDecoder(stdout).Decode(&obj)
|
err := json.NewDecoder(stdout).Decode(&obj)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, fmt.Errorf("json.Decode: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
inner, ok := obj["inner"].([]interface{})
|
inner, ok := obj["inner"].([]interface{})
|
||||||
|
@ -398,8 +398,6 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) {
|
|||||||
|
|
||||||
} else if m.ReturnType.QtClassType() && !m.ReturnType.Pointer {
|
} else if m.ReturnType.QtClassType() && !m.ReturnType.Pointer {
|
||||||
shouldReturn = m.ReturnType.ParameterType + " ret = "
|
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 = "\t// Copy-construct value returned type into heap-allocated copy\n"
|
||||||
afterCall += "\treturn static_cast<" + m.ReturnType.ParameterType + "*>(new " + m.ReturnType.ParameterType + "(ret));\n"
|
afterCall += "\treturn static_cast<" + m.ReturnType.ParameterType + "*>(new " + m.ReturnType.ParameterType + "(ret));\n"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user