diff options
author | Christian Tismer <[email protected]> | 2023-02-07 13:07:51 +0100 |
---|---|---|
committer | Christian Tismer <[email protected]> | 2023-02-08 14:02:02 +0100 |
commit | e7770a2933344d0685bffc5ebe585157136249ef (patch) | |
tree | c183a2ef11cc5d3a782fd0ad5e280b18a5a6e9d8 /sources/shiboken6/libshiboken/helper.cpp | |
parent | 53dbaf2f87c8f39851bb81e7ebaf66dbcf3f5581 (diff) |
nogil: Apply the first necessary fixes
In a few old patches, we had not updated ob_refcnt to
Py_REFCNT. This will now be necessary when we try the nogil
branch.
Thanks to Jim Kring for providing this initial patch.
Task-number: PYSIDE-2221
Change-Id: I2085407e44d93faf4929aac24facef167f09ac52
Reviewed-by: Shyamnath Premnadh <[email protected]>
Reviewed-by: Qt CI Bot <[email protected]>
Diffstat (limited to 'sources/shiboken6/libshiboken/helper.cpp')
-rw-r--r-- | sources/shiboken6/libshiboken/helper.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sources/shiboken6/libshiboken/helper.cpp b/sources/shiboken6/libshiboken/helper.cpp index 84231f844..d9355b60d 100644 --- a/sources/shiboken6/libshiboken/helper.cpp +++ b/sources/shiboken6/libshiboken/helper.cpp @@ -208,7 +208,7 @@ static void formatPyUnicode(PyObject *obj, std::ostream &str) static void formatPyObjectHelper(PyObject *obj, std::ostream &str) { - str << ", refs=" << obj->ob_refcnt << ", "; + str << ", refs=" << Py_REFCNT(obj) << ", "; if (PyType_Check(obj)) { str << "type: "; formatPyTypeObject(reinterpret_cast<PyTypeObject *>(obj), str); |