diff options
author | Christian Tismer <tismer@stackless.com> | 2017-12-17 19:12:56 +0100 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2018-05-30 18:13:41 +0000 |
commit | 18dc31becdd994c53a9f894087cf1ef99fbd0232 (patch) | |
tree | 3021cfa473f20102bfb63a26117776615b91b526 /sources/shiboken2/libshiboken/autodecref.h | |
parent | 50dd4ae202d7afb3556335c056db003f5ef50532 (diff) |
PEP 384-squash: Implement PEP 384
This is the condensed checkin of 18 commits which created
the implementation of PEP 384.
Task-number: PYSIDE-560
Change-Id: I834c659af4c2b55b268f8e8dc4cfa53f02502409
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'sources/shiboken2/libshiboken/autodecref.h')
-rw-r--r-- | sources/shiboken2/libshiboken/autodecref.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sources/shiboken2/libshiboken/autodecref.h b/sources/shiboken2/libshiboken/autodecref.h index 1f3f41eab..7b6aa47da 100644 --- a/sources/shiboken2/libshiboken/autodecref.h +++ b/sources/shiboken2/libshiboken/autodecref.h @@ -79,7 +79,9 @@ public: /// Returns the pointer of the Python object being held. inline PyObject* object() { return m_pyObj; } inline operator PyObject*() { return m_pyObj; } +#ifndef Py_LIMITED_API inline operator PyTupleObject*() { return reinterpret_cast<PyTupleObject*>(m_pyObj); } +#endif inline operator bool() const { return m_pyObj != 0; } inline PyObject* operator->() { return m_pyObj; } |