diff options
author | Thomas A Caswell <tcaswell@gmail.com> | 2020-06-19 02:34:39 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-06-19 08:34:39 +0200 |
commit | 1e72c2c57efbe0aac96b961a1ba1a8dee9ada4b7 (patch) | |
tree | 4c28942bf9ad431a2aff9540d1382ff1dc23cfab | |
parent | 2c7c22f51405299a4e247f78edf52957d30cf71d (diff) | |
download | cython-1e72c2c57efbe0aac96b961a1ba1a8dee9ada4b7.tar.gz |
Add missing "PyUnicode_GET_LENGTH" to unicode.pxd (GH-3692)
-rw-r--r-- | Cython/Includes/cpython/unicode.pxd | 11 |
1 files changed, 11 insertions, 0 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) |