From 475ebc93b476687038516af19db6b6082ef88278 Mon Sep 17 00:00:00 2001 From: mappu Date: Thu, 22 Aug 2024 21:56:25 +1200 Subject: [PATCH] genbindings: more exceptions --- cmd/genbindings/clang2il.go | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index ca9c7e3..d035d5c 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -271,6 +271,11 @@ nextMethod: continue nextMethod } + if ret.ClassName == "QXmlStreamWriter" && len(mm.Parameters) == 1 && mm.Parameters[0].ParameterType == "QString" && mm.Parameters[0].Pointer { + log.Printf("Skipping ctor taking QString pointer") // qxmlstream.h 4th constructor overload + continue nextMethod + } + ret.Ctors = append(ret.Ctors, mm) case "CXXDestructorDecl": @@ -359,6 +364,11 @@ nextMethod: continue nextMethod } + if ret.ClassName == "QTextStream" && mm.MethodName == "readLineInto" && len(mm.Parameters) > 0 && mm.Parameters[0].ParameterType == "QString" && mm.Parameters[0].Pointer { + log.Printf("Skipping method %q using complex return type by pointer argument", mm.MethodName) // TODO support this + continue nextMethod + } + ret.Methods = append(ret.Methods, mm) default: