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

Avoid use of temporary bytes object in string_caster for UTF-8 #3257

Merged
merged 1 commit into from Sep 9, 2021

Conversation

jbms
Copy link
Contributor

@jbms jbms commented Sep 9, 2021

Description

Fixes #3252

Suggested changelog entry:

Conversion to ``std::string`` and ``std::string_view`` now avoids making an extra copy of the data on Python >= 3.3.

include/pybind11/cast.h Outdated Show resolved Hide resolved
include/pybind11/cast.h Outdated Show resolved Hide resolved
include/pybind11/cast.h Show resolved Hide resolved
@jbms jbms force-pushed the fix-3252 branch 3 times, most recently from 865269b to 9ca9fc9 Compare September 9, 2021 17:14
@jbms jbms requested a review from Skylion007 September 9, 2021 17:15
include/pybind11/cast.h Outdated Show resolved Hide resolved
@Skylion007 Skylion007 merged commit 4d5ad03 into pybind:master Sep 9, 2021
@github-actions github-actions bot added the needs changelog Possibly needs a changelog entry label Sep 9, 2021
@henryiii henryiii removed the needs changelog Possibly needs a changelog entry label Sep 16, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG]: string_caster should not use temporary on Python >= 3.3
4 participants