Add a missing bytes ctor from const char *
diff --git a/include/pybind11/pytypes.h b/include/pybind11/pytypes.h
index b148c2a..d3895db 100644
--- a/include/pybind11/pytypes.h
+++ b/include/pybind11/pytypes.h
@@ -387,6 +387,11 @@
public:
PYBIND11_OBJECT_DEFAULT(bytes, object, PYBIND11_BYTES_CHECK)
+ bytes(const char *c)
+ : object(PYBIND11_BYTES_FROM_STRING(c), false) {
+ if (!m_ptr) pybind11_fail("Could not allocate bytes object!");
+ }
+
bytes(const char *c, size_t n)
: object(PYBIND11_BYTES_FROM_STRING_AND_SIZE(c, (ssize_t) n), false) {
if (!m_ptr) pybind11_fail("Could not allocate bytes object!");