From 92943cbb530edb4fd8b7292b3b0ea964d7a6fdde Mon Sep 17 00:00:00 2001 From: Friedemann Kleint Date: Thu, 29 Sep 2022 16:07:50 +0200 Subject: shiboken6/macOS: Fix C++ 11 integer types (int32_t, ...) not being recognized The system type headers were not parsed when Xcode was installed under /Applications/Xcode.app/Contents/Developer/..., causing the typedefs not to be seen and int32_t being handled as unknown primitive types. The array modifications for the OpenGL functions were then not generated correctly. Fix by using QString::contains() for checking. Pick-to: 6.3 6.2 5.15 Change-Id: Ia4344599807a9fcc3d4de5bbe850575faace4b3e Reviewed-by: Christian Tismer --- sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp index d2ac713b9..8fb362214 100644 --- a/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp +++ b/sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp @@ -824,10 +824,11 @@ bool BuilderPrivate::visitHeader(const QString &fileName) const case Platform::macOS: // Parse the following system headers to get the correct typdefs for types like // int32_t, which are used in the macOS implementation of OpenGL framework. + // They are installed under /Applications/Xcode.app/Contents/Developer/Platforms... if (baseName == u"gltypes.h" - || fileName.startsWith(u"/usr/include/_types") - || fileName.startsWith(u"/usr/include/_types") - || fileName.startsWith(u"/usr/include/sys/_types")) { + || fileName.contains(u"/usr/include/_types") + || fileName.contains(u"/usr/include/_types") + || fileName.contains(u"/usr/include/sys/_types")) { return true; } break; -- cgit v1.2.3