Skip to content

Commit ece7b35

Browse files
pieperjcfr
authored andcommitted
Fix mac build error with C standard lib macros
This fix errors of that sort: moc_PythonQtStdDecorators.cxx:152:25: error: expected unqualified-id case 4: _t->emit((*reinterpret_cast< QObject*(*)>(_a[1])),(*reinterpret_cast< const Add fix for mac build error related C standard lib macros to main header By updating PythonQtPythonIncludes.h which is included in all PythonQt headers, it is ensured the fix will be applied consistently.
1 parent 46e4b55 commit ece7b35

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

src/PythonQtInstanceWrapper.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,7 @@
4545
#include "PythonQtPythonInclude.h"
4646

4747
#include "PythonQtSystem.h"
48+
4849
#include <QPointer>
4950

5051
#include "structmember.h"

src/PythonQtPythonInclude.h

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,27 @@
9292
# include <Python.h>
9393
#endif
9494

95+
/*
96+
* The following undefs for C standard library macros prevent
97+
* build errors of the following type on mac ox 10.7.4 and XCode 4.3.3
98+
*
99+
/usr/include/c++/4.2.1/bits/localefwd.h:57:21: error: too many arguments provided to function-like macro invocation
100+
isspace(_CharT, const locale&);
101+
^
102+
/usr/include/c++/4.2.1/bits/localefwd.h:56:5: error: 'inline' can only appear on functions
103+
inline bool
104+
^
105+
/usr/include/c++/4.2.1/bits/localefwd.h:57:5: error: variable 'isspace' declared as a template
106+
isspace(_CharT, const locale&);
107+
^
108+
*/
109+
#undef isspace
110+
#undef isupper
111+
#undef islower
112+
#undef isalpha
113+
#undef isalnum
114+
#undef toupper
115+
#undef tolower
116+
95117
#endif
118+

0 commit comments

Comments
 (0)