Lines Matching refs:bytes
886 class bytes;
905 explicit str(const bytes &b);
955 class bytes : public object {
957 PYBIND11_OBJECT(bytes, object, PYBIND11_BYTES_CHECK)
960 bytes(const char *c = "")
962 if (!m_ptr) pybind11_fail("Could not allocate bytes object!");
965 bytes(const char *c, size_t n)
967 if (!m_ptr) pybind11_fail("Could not allocate bytes object!");
971 bytes(const std::string &s) : bytes(s.data(), s.size()) { }
973 explicit bytes(const pybind11::str &s);
979 pybind11_fail("Unable to extract bytes contents!");
984 inline bytes::bytes(const pybind11::str &s) {
997 pybind11_fail("Could not allocate bytes object!");
1001 inline str::str(const bytes& b) {
1005 pybind11_fail("Unable to extract bytes contents!");