summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas A Caswell <tcaswell@gmail.com>2020-06-19 02:34:39 -0400
committerStefan Behnel <stefan_ml@behnel.de>2020-06-19 08:35:39 +0200
commit9faf0fd7190346bebb6d058e7bf8af7ba86476a1 (patch)
treee859576885bd7eedff0bc02cc61c44ec82a1076d
parentbba78fb83ee71ba2a465d651bb251bbae91e4b8f (diff)
downloadcython-9faf0fd7190346bebb6d058e7bf8af7ba86476a1.tar.gz
Add missing "PyUnicode_GET_LENGTH" to unicode.pxd (GH-3692)
-rw-r--r--Cython/Includes/cpython/unicode.pxd11
1 files changed, 11 insertions, 0 deletions
diff --git a/Cython/Includes/cpython/unicode.pxd b/Cython/Includes/cpython/unicode.pxd
index 9060d8c55..061be0905 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)