mirror of
https://github.com/pybind/pybind11.git
synced 2025-01-19 09:25:51 +00:00
Use explicit casts in str/bytes tests
This commit is contained in:
parent
fd6cede7e9
commit
1e1217817b
@ -140,19 +140,19 @@ public:
|
||||
}
|
||||
|
||||
py::bytes get_bytes_from_string() {
|
||||
return std::string("foo");
|
||||
return (py::bytes) std::string("foo");
|
||||
}
|
||||
|
||||
py::bytes get_bytes_from_str() {
|
||||
return py::str(std::string("bar"));
|
||||
return (py::bytes) py::str(std::string("bar"));
|
||||
}
|
||||
|
||||
py::str get_str_from_string() {
|
||||
return std::string("baz");
|
||||
return (py::str) std::string("baz");
|
||||
}
|
||||
|
||||
py::str get_str_from_bytes() {
|
||||
return py::bytes(std::string("boo"));
|
||||
return (py::str) py::bytes(std::string("boo"));
|
||||
}
|
||||
|
||||
static int value;
|
||||
|
Loading…
Reference in New Issue
Block a user