From 9382b01a2f6ff8ff294fe73f2d27b24f5c8dfb3c Mon Sep 17 00:00:00 2001 From: Christian Tismer Date: Sat, 25 Aug 2018 17:06:06 +0200 Subject: 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 --- sources/shiboken2/libshiboken/signature.cpp | 16 ---------------- 1 file changed, 16 deletions(-) (limited to 'sources/shiboken2/libshiboken') 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 -#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" -- cgit v1.2.3