Commit 04358b02 by Wenzel Jakob

Always record the __module__ in newly created Python types

parent 96c10530
...@@ -521,8 +521,7 @@ public: ...@@ -521,8 +521,7 @@ public:
m_ptr = (PyObject *) type; m_ptr = (PyObject *) type;
/* Needed by pydoc */ /* Needed by pydoc */
if (((module &) scope).check()) attr("__module__") = scope_name;
attr("__module__") = scope_name;
auto &type_info = detail::get_internals().registered_types[tinfo]; auto &type_info = detail::get_internals().registered_types[tinfo];
type_info.type = (PyTypeObject *) m_ptr; type_info.type = (PyTypeObject *) m_ptr;
......
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