mirror of
https://github.com/mappu/miqt.git
synced 2024-12-23 01:18:37 +00:00
genbindings: allow compilation if we return a const void*
This commit is contained in:
parent
05804f837e
commit
bc3bfa88ad
@ -233,6 +233,8 @@ func emitBindingCpp(src *CppParsedHeader, filename string) (string, error) {
|
|||||||
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<P" + m.ReturnType.ParameterType + ">(new " + m.ReturnType.ParameterType + "(ret));\n"
|
afterCall += "\treturn static_cast<P" + m.ReturnType.ParameterType + ">(new " + m.ReturnType.ParameterType + "(ret));\n"
|
||||||
|
|
||||||
|
} else if m.ReturnType.Const {
|
||||||
|
shouldReturn += "(" + emitReturnTypeCabi(m.ReturnType) + ") "
|
||||||
}
|
}
|
||||||
|
|
||||||
preamble, forwarding := emitParametersCABI2CppForwarding(m.Parameters)
|
preamble, forwarding := emitParametersCABI2CppForwarding(m.Parameters)
|
||||||
|
Loading…
Reference in New Issue
Block a user