diff --git a/Cython/Includes/cpython/unicode.pxd b/Cython/Includes/cpython/unicode.pxd index c5f2a0be217d230133a1794a454b110515265fad..63dde4363ea7e55fb0eec9318e5091118c92bf51 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)