diff options
Diffstat (limited to 'Objects/moduleobject.c')
-rw-r--r-- | Objects/moduleobject.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index ae72da6e3b..b6a2d6fe9c 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -380,7 +380,7 @@ PyModule_ExecDef(PyObject *module, PyModuleDef *def) for (cur_slot = def->m_slots; cur_slot && cur_slot->slot; cur_slot++) { switch (cur_slot->slot) { case Py_mod_create: - /* handled in PyModule_CreateFromSlots */ + /* handled in PyModule_FromDefAndSpec2 */ break; case Py_mod_exec: ret = ((int (*)(PyObject *))cur_slot->value)(module); @@ -450,8 +450,7 @@ PyModule_GetDict(PyObject *m) return NULL; } d = ((PyModuleObject *)m) -> md_dict; - if (d == NULL) - ((PyModuleObject *)m) -> md_dict = d = PyDict_New(); + assert(d != NULL); return d; } |