mirror of
https://github.com/pybind/pybind11.git
synced 2024-11-11 08:03:55 +00:00
Clarify docs for functions taking bytes and not str.
This commit is contained in:
parent
27c7697f24
commit
d3908be61d
1
.gitignore
vendored
1
.gitignore
vendored
@ -27,6 +27,7 @@ MANIFEST
|
|||||||
*.py[co]
|
*.py[co]
|
||||||
*.egg-info
|
*.egg-info
|
||||||
*~
|
*~
|
||||||
|
.*.swp
|
||||||
.DS_Store
|
.DS_Store
|
||||||
/dist
|
/dist
|
||||||
/build
|
/build
|
||||||
|
@ -58,7 +58,9 @@ Passing bytes to C++
|
|||||||
--------------------
|
--------------------
|
||||||
|
|
||||||
A Python ``bytes`` object will be passed to C++ functions that accept
|
A Python ``bytes`` object will be passed to C++ functions that accept
|
||||||
``std::string`` or ``char*`` *without* conversion.
|
``std::string`` or ``char*`` *without* conversion. On Python 3, in order to
|
||||||
|
make a function *only* accept ``bytes`` (and not ``str``), declare it as taking
|
||||||
|
a ``py::bytes`` argument.
|
||||||
|
|
||||||
|
|
||||||
Returning C++ strings to Python
|
Returning C++ strings to Python
|
||||||
|
Loading…
Reference in New Issue
Block a user