mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 17:08:38 +00:00
genbindings: allow void* as unsafe.Pointer
This commit is contained in:
parent
172b6e850e
commit
aadc37eb2d
@ -35,6 +35,10 @@ func (p CppParameter) RenderTypeGo() string {
|
|||||||
return "map[" + t.RenderTypeGo() + "]struct{}"
|
return "map[" + t.RenderTypeGo() + "]struct{}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if p.ParameterType == "void" && p.Pointer {
|
||||||
|
return "unsafe.Pointer"
|
||||||
|
}
|
||||||
|
|
||||||
ret := ""
|
ret := ""
|
||||||
if p.ByRef || p.Pointer {
|
if p.ByRef || p.Pointer {
|
||||||
ret += "*"
|
ret += "*"
|
||||||
|
@ -236,10 +236,6 @@ func CheckComplexity(p CppParameter, isReturnType bool) error {
|
|||||||
return ErrTooComplex
|
return ErrTooComplex
|
||||||
}
|
}
|
||||||
|
|
||||||
if p.ParameterType == "void" && p.Pointer {
|
|
||||||
return ErrTooComplex // e.g. qobjectdefs.h QMetaObject->InvokeOnGadget(). TODO represent as uintptr
|
|
||||||
}
|
|
||||||
|
|
||||||
// Should be OK
|
// Should be OK
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user