aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2022-09-29 16:07:50 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2022-09-29 17:18:51 +0200
commit92943cbb530edb4fd8b7292b3b0ea964d7a6fdde (patch)
tree0d066e0bf7e6e5a0898f8c0e19d4bd66a8142690
parentac472b43a0ace04c03c939bc873efb8a18b4e1e3 (diff)
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 <tismer@stackless.com>
-rw-r--r--sources/shiboken6/ApiExtractor/clangparser/clangbuilder.cpp7
1 files 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;