mirror of
https://github.com/mappu/miqt.git
synced 2024-12-22 08:58:37 +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{}"
|
||||
}
|
||||
|
||||
if p.ParameterType == "void" && p.Pointer {
|
||||
return "unsafe.Pointer"
|
||||
}
|
||||
|
||||
ret := ""
|
||||
if p.ByRef || p.Pointer {
|
||||
ret += "*"
|
||||
|
@ -236,10 +236,6 @@ func CheckComplexity(p CppParameter, isReturnType bool) error {
|
||||
return ErrTooComplex
|
||||
}
|
||||
|
||||
if p.ParameterType == "void" && p.Pointer {
|
||||
return ErrTooComplex // e.g. qobjectdefs.h QMetaObject->InvokeOnGadget(). TODO represent as uintptr
|
||||
}
|
||||
|
||||
// Should be OK
|
||||
return nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user