Commit 4ee0f2a1 by Wenzel Jakob

add missing instructor for bool_

parent f2331666
......@@ -264,6 +264,7 @@ inline pybind11::str handle::str() const {
class bool_ : public object {
public:
PYBIND11_OBJECT_DEFAULT(bool_, object, PyBool_Check)
bool_(bool value) : object(value ? Py_True : Py_False, true) { }
operator bool() const { return m_ptr && PyLong_AsLong(m_ptr) != 0; }
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment