Skip to content

Fix Python 3 bytes conversion to std::string/char* #817

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

Merged
merged 1 commit into from
Apr 28, 2017

Conversation

jagerman
Copy link
Member

The Unicode support added in 2.1 (PR #624) inadvertently broke accepting bytes as std::string/char* arguments. This restores it with a separate path that does a plain conversion (i.e. completely bypassing all the encoding/decoding code), but only for single-byte string types.

Fixes #816.

The Unicode support added in 2.1 (PR pybind#624) inadvertently broke accepting
`bytes` as std::string/char* arguments.  This restores it with a
separate path that does a plain conversion (i.e. completely bypassing
all the encoding/decoding code), but only for single-byte string types.
@jagerman jagerman force-pushed the python3-bytes-fix branch from 291c1f9 to 36db77a Compare April 26, 2017 15:19
@wjakob
Copy link
Member

wjakob commented Apr 28, 2017

LGTM

@jagerman jagerman merged commit a7f704b into pybind:master Apr 28, 2017
@dean0x7d dean0x7d modified the milestone: v2.2 Aug 13, 2017
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.

3 participants