Closed pauldotknopf closed 7 years ago
The Python 3.6 headers (and as far also the earlier ones) don't redefine any of those keywords:
% egrep '(slots|signals|emit)' include/python3.6m/*.h
include/python3.6m/Python.h:#include "typeslots.h"
include/python3.6m/moduleobject.h: struct PyModuleDef_Slot* m_slots;
include/python3.6m/object.h: PyType_Slot *slots; /* terminated by slot==0. */
include/python3.6m/object.h: PyObject *ht_name, *ht_slots, *ht_qualname;
include/python3.6m/object.h: /* here are optional user slots, followed by the members. */
include/python3.6m/pylifecycle.h:/* Restore signals that the interpreter has called SIG_IGN on to SIG_DFL. */
include/python3.6m/setobject.h:The hash field of Unused slots is always zero.
include/python3.6m/setobject.h:The hash field of Dummy slots are set to -1
include/python3.6m/setobject.h: /* The table contains mask + 1 slots, and that's a power of 2.
What kind of compile error do you get?
Ah! Now I understand what you mean. Qt does redefine keywords such as slots
and because of that, the Python headers that use slots
as a variable name will get those redefined. You can work around this by including Python.h
before any of the Qt headers.
Work around: You can work around this by including Python.h before any of the Qt headers.
This will help me debug issues that I may have with it. However, since Python.h contains keywords that are specific to qt, we must instead use the macros.
Side note, how are you able to use Python.h and the qt keywords in the same project? Python.h contains structs/properties that are reserved qt keywords. I see you are using the keywords. How?