mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +00:00
genbindings: minimal handling for metacast() returning void*
This commit is contained in:
parent
5321074f99
commit
05804f837e
@ -44,8 +44,6 @@ func emitParametersGo2CABIForwarding(m CppMethod) (preamble string, fowarding st
|
||||
preamble += "defer C.free(" + p.ParameterName + "_Cstring)\n"
|
||||
tmp = append(tmp, p.ParameterName+"_Cstring, len("+p.ParameterName+")")
|
||||
|
||||
// TODO handle the return type as a pointer parameter
|
||||
|
||||
} else if p.Pointer && p.ParameterType == "char" {
|
||||
// Single char* argument
|
||||
preamble += p.ParameterName + "_Cstring := C.CString(" + p.ParameterName + ")\n"
|
||||
@ -129,6 +127,9 @@ import "C"
|
||||
shouldReturn = ""
|
||||
returnTypeDecl = ""
|
||||
|
||||
} else if m.ReturnType.ParameterType == "void" && m.ReturnType.Pointer {
|
||||
returnTypeDecl = "interface{}"
|
||||
|
||||
} else if m.ReturnType.ParameterType == "QString" {
|
||||
shouldReturn = ""
|
||||
returnTypeDecl = "string"
|
||||
|
Loading…
Reference in New Issue
Block a user