MCPcopy Create free account
hub / github.com/ceph/ceph / py_bytes_from_span

Function py_bytes_from_span

src/mgr/PyModule.cc:172–178  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172PyObject *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
180std::vector<std::byte> py_bytes_as_vec(PyObject *bytes)
181{

Callers 1

dispatch_remoteMethod · 0.85

Calls 2

assertFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected