9 #include <pybind11/pybind11.h>
10 #include <pybind11/stl.h>
14 struct type_caster<boost::optional<T>> : optional_caster<boost::optional<T>>
21 const std::string data_str = std::string(data);
22 return std::vector<uint8_t>(data_str.cbegin(), data_str.cend());
27 return py::bytes(std::string(data.cbegin(), data.cend()));
32 const std::string data_str = std::string(data);
33 return std::vector<uint64_t>(data_str.cbegin(), data_str.cend());
38 return py::bytes(std::string(data.cbegin(), data.cend()));