diff options
author | Christian Tismer <tismer@stackless.com> | 2018-08-22 14:41:41 +0200 |
---|---|---|
committer | Christian Tismer <tismer@stackless.com> | 2018-08-23 07:51:54 +0000 |
commit | b45a890df5bb26c3a4feb8d57dd994fdaaf9c750 (patch) | |
tree | cd425ec17ee5bb3211b4e97c37bf2ac8b91cb075 /sources/shiboken2/libshiboken/sbkenum.cpp | |
parent | 50dca3ef00ffe074959cccb4b2b451cbf0afd384 (diff) |
Limited API: remove the "slot_" workaround
It has been a problem to compile the file "typespec.*" when using
Python 2. For some reason, the name "slot" was not usable.
I cannot find out what it was and how it vanished, but now I could
remove the work-around without problems. Maybe it is due to some
different includes which don't define some macros?
Change-Id: If316c9c78a18cffcc5e4cac07610bd7f522db446
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken2/libshiboken/sbkenum.cpp')
-rw-r--r-- | sources/shiboken2/libshiboken/sbkenum.cpp | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/sources/shiboken2/libshiboken/sbkenum.cpp b/sources/shiboken2/libshiboken/sbkenum.cpp index b034d1c0f..fb55267d1 100644 --- a/sources/shiboken2/libshiboken/sbkenum.cpp +++ b/sources/shiboken2/libshiboken/sbkenum.cpp @@ -524,13 +524,8 @@ copyNumberMethods(PyTypeObject *flagsType, int *pidx) { int idx = *pidx; -#ifdef IS_PY3K -# define SLOT slot -#else -# define SLOT slot_ -#endif #define PUT_SLOT(name) \ - number_slots[idx].SLOT = (name); \ + number_slots[idx].slot = (name); \ number_slots[idx].pfunc = PyType_GetSlot(flagsType, (name)); \ ++idx; @@ -593,8 +588,8 @@ newTypeWithName(const char* name, newspec->flags = SbkNewType_spec.flags; // we must append all the number methods, so rebuild everything: int idx = 0; - while (SbkNewType_slots[idx].SLOT) { - newslots[idx].SLOT = SbkNewType_slots[idx].SLOT; + while (SbkNewType_slots[idx].slot) { + newslots[idx].slot = SbkNewType_slots[idx].slot; newslots[idx].pfunc = SbkNewType_slots[idx].pfunc; ++idx; } |