aboutsummaryrefslogtreecommitdiffstats
path: root/sources/shiboken2/libshiboken/pep384impl.h
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-06 21:19:07 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2019-05-06 21:19:07 +0200
commit91b93e1021ccc06d13e0d66a43bf7f9063faeff3 (patch)
treef5270164466b42367d4df63d723b3a4db4d7d0fe /sources/shiboken2/libshiboken/pep384impl.h
parentedae6185cef9c0ddd7c7c88bfa97c5043ba0d78a (diff)
parent06f97eca45ddadf4f04229cf14d5dc0bbd867316 (diff)
Merge remote-tracking branch 'origin/5.12' into 5.13
Diffstat (limited to 'sources/shiboken2/libshiboken/pep384impl.h')
-rw-r--r--sources/shiboken2/libshiboken/pep384impl.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/sources/shiboken2/libshiboken/pep384impl.h b/sources/shiboken2/libshiboken/pep384impl.h
index ffbc570a8..93f718988 100644
--- a/sources/shiboken2/libshiboken/pep384impl.h
+++ b/sources/shiboken2/libshiboken/pep384impl.h
@@ -201,7 +201,12 @@ LIBSHIBOKEN_API int Pep_GetVerboseFlag(void);
LIBSHIBOKEN_API char *_PepUnicode_AsString(PyObject *);
+#if PY_VERSION_HEX < 0x03000000
#define PyUnicode_GET_SIZE(op) PyUnicode_GetSize((PyObject *)(op))
+#else
+// PyUnicode_GetSize is deprecated in favor of PyUnicode_GetLength
+#define PyUnicode_GET_SIZE(op) PyUnicode_GetLength((PyObject *)(op))
+#endif
#else
#define _PepUnicode_AsString PyUnicode_AsUTF8