diff --git a/cmd/genbindings/clang2il.go b/cmd/genbindings/clang2il.go index 2c734b3f..3727d4b7 100644 --- a/cmd/genbindings/clang2il.go +++ b/cmd/genbindings/clang2il.go @@ -788,12 +788,6 @@ func parseTypeString(typeString string) (CppParameter, []CppParameter, bool, err returnType := parseSingleTypeString(strings.TrimSpace(typeString[0:opos])) - // Skip functions that return ints-by-reference since the ergonomics don't - // go through the binding - if returnType.IntType() && returnType.ByRef { - return CppParameter{}, nil, false, ErrTooComplex // e.g. QSize::rheight() - } - inner := typeString[opos+1 : epos] // Should be no more brackets diff --git a/cmd/genbindings/config-allowlist.go b/cmd/genbindings/config-allowlist.go index 60fce8f7..157c8c43 100644 --- a/cmd/genbindings/config-allowlist.go +++ b/cmd/genbindings/config-allowlist.go @@ -347,6 +347,12 @@ func AllowMethod(className string, mm CppMethod) error { return ErrTooComplex } + // Skip functions that return ints-by-reference since the ergonomics don't + // go through the binding + if mm.ReturnType.IntType() && mm.ReturnType.ByRef { + return ErrTooComplex // e.g. QSize::rheight() + } + return nil // OK, allow }