| 170 | } |
| 171 | |
| 172 | PyObject *py_bytes_from_span(std::span<std::byte const> s) |
| 173 | { |
| 174 | auto ret = PyBytes_FromStringAndSize( |
| 175 | reinterpret_cast<const char*>(s.data()), s.size_bytes()); |
| 176 | assert(ret); |
| 177 | return ret; |
| 178 | } |
| 179 | |
| 180 | std::vector<std::byte> py_bytes_as_vec(PyObject *bytes) |
| 181 | { |
no test coverage detected