MCPcopy Create free account
hub / github.com/pybind/pybind11 / bytes

Method bytes

include/pybind11/pytypes.h:1757–1761  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1755 // Allow implicit conversion:
1756 // NOLINTNEXTLINE(google-explicit-constructor)
1757 bytes(const char *c = "") : object(PYBIND11_BYTES_FROM_STRING(c), stolen_t{}) {
1758 if (!m_ptr) {
1759 pybind11_fail("Could not allocate bytes object!");
1760 }
1761 }
1762
1763 template <typename SzType, detail::enable_if_t<std::is_integral<SzType>::value, int> = 0>
1764 bytes(const char *c, const SzType &n)

Callers

nothing calls this directly

Calls 3

ssize_t_castFunction · 0.85
dataMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected