From 79ced6fbbdda1158aef437760ee0455fb9a9016d Mon Sep 17 00:00:00 2001 From: Michele Calgaro Date: Thu, 19 Jan 2023 23:33:44 +0900 Subject: Remove/replace old conditional python code. Signed-off-by: Michele Calgaro --- sip/tdecore/kmacroexpander.sip | 4 ++-- sip/tdecore/tdeaccel.sip | 2 +- sip/tdecore/tdeapplication.sip | 4 ++-- sip/tdecore/tdecmdlineargs.sip | 12 ++++++------ sip/tdecore/tdeconfigbase.sip | 14 ++------------ sip/tdeio/authinfo.sip | 2 +- 6 files changed, 14 insertions(+), 24 deletions(-) diff --git a/sip/tdecore/kmacroexpander.sip b/sip/tdecore/kmacroexpander.sip index bb3a39d..8d0d3d0 100644 --- a/sip/tdecore/kmacroexpander.sip +++ b/sip/tdecore/kmacroexpander.sip @@ -143,7 +143,7 @@ TQString expandMacrosShellQuote (const TQString&, const TQMap= 2 && PY_MINOR_VERSION >= 3 -#define LONG_LONG PY_LONG_LONG -#endif -%End %ConvertFromTypeCode if (!sipCpp) Py_INCREF (Py_None); @@ -272,7 +267,7 @@ protected: // PyObject *LongLong; - return PyLong_FromLongLong (*(LONG_LONG *)sipCpp); + return PyLong_FromLongLong (*(PY_LONG_LONG *)sipCpp); %End %ConvertToTypeCode @@ -296,17 +291,12 @@ protected: %MappedType ulonglong //converts a Python long { -%TypeHeaderCode -#if PY_MAJOR_VERSION >= 2 && PY_MINOR_VERSION >= 3 -#define LONG_LONG PY_LONG_LONG -#endif -%End %ConvertFromTypeCode if (!sipCpp) Py_INCREF (Py_None); return Py_None; - return PyLong_FromUnsignedLongLong (*(LONG_LONG *)sipCpp); + return PyLong_FromUnsignedLongLong (*(PY_LONG_LONG *)sipCpp); %End %ConvertToTypeCode diff --git a/sip/tdeio/authinfo.sip b/sip/tdeio/authinfo.sip index 95ff7da..e3b5a07 100644 --- a/sip/tdeio/authinfo.sip +++ b/sip/tdeio/authinfo.sip @@ -151,7 +151,7 @@ typedef TQMap KStringListMap; for (it = map.begin (); it != map.end (); ++it) { - PyObject *sKey = SIPBytes_FromString ((const char *)((TQString)it.key ())); + PyObject *sKey = PyBytes_FromString ((const char *)((TQString)it.key ())); PyObject *sData = sipConvertFromInstance ((void *)&it.data (), sipClass_TQStringList, sipTransferObj); if ((sKey == NULL) || (sData == NULL) || (PyDict_SetItem (dict, sKey, sData) < 0)) -- cgit v1.2.1