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

Simplified converting to char * #8662

Merged
merged 1 commit into from
Jan 8, 2025
Merged

Conversation

radarhere
Copy link
Member

@radarhere radarhere commented Jan 5, 2025

Rather than using PyUnicode_AsUTF8String to get a PyObject and then passing that to PyBytes_AS_STRING to get char * and PyBytes_GET_SIZE to get Py_ssize_t,

just use PyUnicode_AsUTF8AndSize. It returns const char * and passes back Py_ssize_t.

@hugovk hugovk merged commit b69f204 into python-pillow:main Jan 8, 2025
50 of 51 checks passed
@radarhere radarhere deleted the pyunicode branch January 8, 2025 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants