From 7fbce56a57bd8ef45191eb8e4abb4b5d8edb1384 Mon Sep 17 00:00:00 2001 From: Berker Peksag Date: Fri, 19 Aug 2016 12:00:13 +0300 Subject: Issue #12946: Remove dead code in PyModule_GetDict PyModule_NewObject already sets md_dict to PyDict_New(): m->md_dict = PyDict_New(); --- Objects/moduleobject.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Objects/moduleobject.c b/Objects/moduleobject.c index a4cdc20..fb568f5 100644 --- a/Objects/moduleobject.c +++ b/Objects/moduleobject.c @@ -444,8 +444,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; } -- cgit v0.12