aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2018-08-25 17:06:06 +0200
committerChristian Tismer <tismer@stackless.com>2018-08-27 07:25:35 +0000
commit9382b01a2f6ff8ff294fe73f2d27b24f5c8dfb3c (patch)
tree3c3b86d49a8f02c7595a0c486c4ddbf486113640 /sources/shiboken2/libshiboken
parent9385e1731153eebb25885f2bf51bb9cd91d6f7a4 (diff)
Make signature module unconditional
After the signature module has been around for quite a while, there is no longer a reason to leave it optional. At the same time, we set the minimum Python 3 version to 3.5 . Some comments are reworked as well, but nothing real changed. Task-number: PYSIDE-510 Change-Id: I9e960f390d507d24bb45f7028838755fe23e751d Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Diffstat (limited to 'sources/shiboken2/libshiboken')
-rw-r--r--sources/shiboken2/libshiboken/signature.cpp16
1 files changed, 0 insertions, 16 deletions
diff --git a/sources/shiboken2/libshiboken/signature.cpp b/sources/shiboken2/libshiboken/signature.cpp
index df49a4d29..4ad22de77 100644
--- a/sources/shiboken2/libshiboken/signature.cpp
+++ b/sources/shiboken2/libshiboken/signature.cpp
@@ -107,12 +107,6 @@ extern "C"
#include "signature.h"
#include <structmember.h>
-#define EXTENSION_ENABLED \
- PY_VERSION_HEX >= 0x03040000 || \
- (PY_VERSION_HEX < 0x03000000 && PY_VERSION_HEX >= 0x02070000)
-
-#if EXTENSION_ENABLED
-
// These constants were needed in former versions of the module:
#define PYTHON_HAS_QUALNAME (PY_VERSION_HEX >= 0x03030000)
#define PYTHON_HAS_UNICODE (PY_VERSION_HEX >= 0x03000000)
@@ -697,20 +691,14 @@ PySide_BuildSignatureProps(PyObject *classmod)
return dict;
}
-#endif // EXTENSION_ENABLED
-
int
SbkSpecial_Type_Ready(PyObject *module, PyTypeObject *type,
const char *signatures)
{
int ret;
-#if EXTENSION_ENABLED
if (PySideType_Ready(type) < 0)
return -1;
ret = PySide_BuildSignatureArgs(module, (PyObject *)type, signatures);
-#else
- ret = PyType_Ready(type);
-#endif
if (ret < 0) {
PyErr_Print();
PyErr_SetNone(PyExc_ImportError);
@@ -718,7 +706,6 @@ SbkSpecial_Type_Ready(PyObject *module, PyTypeObject *type,
return ret;
}
-#if EXTENSION_ENABLED
static int
PySide_FinishSignatures(PyObject *module, const char *signatures)
{
@@ -765,17 +752,14 @@ PySide_FinishSignatures(PyObject *module, const char *signatures)
}
return 0;
}
-#endif // EXTENSION_ENABLED
void
FinishSignatureInitialization(PyObject *module, const char *signatures)
{
-#if EXTENSION_ENABLED
if (PySide_FinishSignatures(module, signatures) < 0) {
PyErr_Print();
PyErr_SetNone(PyExc_ImportError);
}
-#endif
}
} //extern "C"