We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 01a53c7 commit 7f64ed3Copy full SHA for 7f64ed3
include/pybind11/pybind11.h
@@ -899,8 +899,8 @@ class module_ : public object {
899
#else
900
m_ptr = PyModule_New(name);
901
#endif
902
- if (m_ptr == nullptr)
903
- pybind11_fail("Internal error in module_::module_()");
+ if (!m_ptr)
+ pybind11_fail("Could not allocate module object!");
904
if (doc && options::show_user_defined_docstrings()) {
905
#if PY_MAJOR_VERSION >= 3 && !defined(PYPY_VERSION)
906
if (PyModule_SetDocString(m_ptr, doc) != 0)
0 commit comments