Use explicit casts in str/bytes tests

This commit is contained in:
Ivan Smirnov 2016-08-13 18:52:39 +01:00
parent fd6cede7e9
commit 1e1217817b

View File

@ -140,19 +140,19 @@ public:
} }
py::bytes get_bytes_from_string() { py::bytes get_bytes_from_string() {
return std::string("foo"); return (py::bytes) std::string("foo");
} }
py::bytes get_bytes_from_str() { 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() { py::str get_str_from_string() {
return std::string("baz"); return (py::str) std::string("baz");
} }
py::str get_str_from_bytes() { py::str get_str_from_bytes() {
return py::bytes(std::string("boo")); return (py::str) py::bytes(std::string("boo"));
} }
static int value; static int value;