aboutsummaryrefslogtreecommitdiffstats
path: root/sources/pyside2/libpyside/pysideproperty.cpp
diff options
context:
space:
mode:
authorChristian Tismer <tismer@stackless.com>2020-10-27 17:09:45 +0100
committerChristian Tismer <tismer@stackless.com>2020-10-27 21:13:56 +0000
commit5de0db2391c719ef6c484813cc4aee61da355160 (patch)
tree93facde76f304de3118477d90163108e97018d09 /sources/pyside2/libpyside/pysideproperty.cpp
parentdcced0742f383b1932d0e56323387fbd8aeb4513 (diff)
remove traces of Python2 from C code
It will be assumed that Python is always Python 3. All checks for Python 2 are removed. This is the second part of cleaning up the C code from references to Python 2. Task-number: PYSIDE-904 Change-Id: I3006412c2a5bb65402101b0aac5a5f2fc79ce2f8 Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Diffstat (limited to 'sources/pyside2/libpyside/pysideproperty.cpp')
-rw-r--r--sources/pyside2/libpyside/pysideproperty.cpp7
1 files changed, 1 insertions, 6 deletions
diff --git a/sources/pyside2/libpyside/pysideproperty.cpp b/sources/pyside2/libpyside/pysideproperty.cpp
index bcb2ab356..30cfabf86 100644
--- a/sources/pyside2/libpyside/pysideproperty.cpp
+++ b/sources/pyside2/libpyside/pysideproperty.cpp
@@ -354,13 +354,8 @@ static PyObject *qPropertyDocGet(PyObject *self, void *)
PySidePropertyPrivate *pData = data->d;
QByteArray doc(pData->doc);
- if (!doc.isEmpty()) {
-#if PY_MAJOR_VERSION >= 3
+ if (!doc.isEmpty())
return PyUnicode_FromString(doc);
-#else
- return PyString_FromString(doc);
-#endif
- }
if (pData->fget != nullptr) {
// PYSIDE-1019: Fetch the default `__doc__` from fget. We do it late.
AutoDecRef get_doc(PyObject_GetAttr(pData->fget, PyMagicName::doc()));