We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e763f04 commit 55dc131Copy full SHA for 55dc131
.gitignore
@@ -27,6 +27,7 @@ MANIFEST
27
*.py[co]
28
*.egg-info
29
*~
30
+.*.swp
31
.DS_Store
32
/dist
33
/build
docs/advanced/cast/strings.rst
@@ -58,7 +58,9 @@ Passing bytes to C++
58
--------------------
59
60
A Python ``bytes`` object will be passed to C++ functions that accept
61
-``std::string`` or ``char*`` *without* conversion.
+``std::string`` or ``char*`` *without* conversion. On Python 3, in order to
62
+make a function *only* accept ``bytes`` (and not ``str``), declare it as taking
63
+a ``py::bytes`` argument.
64
65
66
Returning C++ strings to Python
0 commit comments