Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MNT: expose PyUnicode_GET_LENGTH #3692

Merged
merged 2 commits into from
Jun 19, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Cython/Includes/cpython/unicode.pxd
Original file line number Diff line number Diff line change
Expand Up @@ -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 4.0:
scoder marked this conversation as resolved.
Show resolved Hide resolved
# 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)
Expand Down