aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken/pep384impl_doc.rst
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2020-04-16 13:45:11 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2020-04-17 10:52:51 +0200
commit1bca8bf41719a051df7304101b48ca1db6112088 (patch)
treec5c2278f721110daf5dbfc705288b1e9f8a4490c /sources/shiboken2/libshiboken/pep384impl_doc.rst
parentd2be09eef06241cd4c9eb7a0ca1a993dc2355f02 (diff)
parentc121c29952f3070e110dc9a9c86bf5fd41c14d92 (diff)
Merge "Merge remote-tracking branch 'origin/5.14' into 5.14.2"
Diffstat (limited to 'sources/shiboken2/libshiboken/pep384impl_doc.rst')
-rw-r--r--sources/shiboken2/libshiboken/pep384impl_doc.rst16
1 files changed, 14 insertions, 2 deletions
diff --git a/sources/shiboken2/libshiboken/pep384impl_doc.rst b/sources/shiboken2/libshiboken/pep384impl_doc.rst
index 2f3b7ea97..d8ebdbe70 100644
--- a/sources/shiboken2/libshiboken/pep384impl_doc.rst
+++ b/sources/shiboken2/libshiboken/pep384impl_doc.rst
@@ -70,8 +70,10 @@ supported. We redefined it as macro ``Py_VerboseFlag`` which calls ``Pep_Verbose
unicodeobject.h
---------------
-The macro ``PyUnicode_GET_SIZE`` was redefined to call into ``PyUnicode_GetSize``
-for Python 2, and ``PyUnicode_GetLength`` for Python 3.
+The macro ``PyUnicode_GET_SIZE`` was removed and replaced by ``PepUnicode_GetLength``
+which evaluates to ``PyUnicode_GetSize`` for Python 2 and ``PyUnicode_GetLength`` for Python 3.
+Since Python 3.3, ``PyUnicode_GetSize`` would have the bad side effect of requiring the GIL!
+
Function ``_PyUnicode_AsString`` is unavailable and was replaced by a macro
that calls ``_PepUnicode_AsString``. The implementation was a bit involved,
and it would be better to change the code and replace this function.
@@ -104,6 +106,16 @@ listobject.h
function calls.
+dictobject.h
+------------
+
+``PyDict_GetItem`` also exists in a ``PyDict_GetItemWithError`` version that does
+not suppress errors. This suppression has the side effect of touching global
+structures. This function exists in Python 2 only since Python 2.7.12 and has
+a different name. We simply implemented the function.
+Needed to avoid the GIL when accessing dictionaries.
+
+
methodobject.h
--------------