diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2020-06-19 09:15:23 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2020-06-19 09:15:23 +0200 |
commit | 64aafe5655e4390751756c6eb1b6af06a37d016d (patch) | |
tree | 1b36a32b05e53e2c7536f7f75efb1ecae0571feb | |
parent | e87a5559b67e99e660eb360a653cd13d9380c785 (diff) | |
parent | 56262e2971c76c920c61a5e583285834346e15fe (diff) | |
download | cython-64aafe5655e4390751756c6eb1b6af06a37d016d.tar.gz |
Merge branch '0.29.x'
-rw-r--r-- | Cython/Includes/cpython/unicode.pxd | 11 | ||||
-rw-r--r-- | Cython/Utility/ImportExport.c | 2 |
2 files changed, 12 insertions, 1 deletions
diff --git a/Cython/Includes/cpython/unicode.pxd b/Cython/Includes/cpython/unicode.pxd index c5f2a0be2..63dde4363 100644 --- a/Cython/Includes/cpython/unicode.pxd +++ b/Cython/Includes/cpython/unicode.pxd @@ -10,8 +10,19 @@ cdef extern from *: # Return the size of the object. o has to be a PyUnicodeObject # (not checked). + # + # Deprecated since version 3.3, will be removed in version 3.10: + # Part of the old-style Unicode API, please migrate to using + # PyUnicode_GET_LENGTH(). Py_ssize_t PyUnicode_GET_SIZE(object o) + # Return the length of the Unicode string, in code points. o has + # to be a Unicode object in the “canonical” representation (not + # checked). + # + # New in version 3.3. + Py_ssize_t PyUnicode_GET_LENGTH(object o) + # Return the size of the object's internal buffer in bytes. o has # to be a PyUnicodeObject (not checked). Py_ssize_t PyUnicode_GET_DATA_SIZE(object o) diff --git a/Cython/Utility/ImportExport.c b/Cython/Utility/ImportExport.c index 68e37ce76..3d4e5ee63 100644 --- a/Cython/Utility/ImportExport.c +++ b/Cython/Utility/ImportExport.c @@ -300,7 +300,7 @@ __Pyx_import_all_from(PyObject *locals, PyObject *v) PyString_AS_STRING(name)[0] == '_') #else PyUnicode_Check(name) && - PyUnicode_AS_UNICODE(name)[0] == '_') + __Pyx_PyUnicode_READ_CHAR(name, 0) == '_') #endif { Py_DECREF(name); |