diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2016-08-19 09:00:13 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2016-08-19 09:00:13 (GMT) |
commit | 7fbce56a57bd8ef45191eb8e4abb4b5d8edb1384 (patch) | |
tree | e4ca090644c0e16ec58a79258cb58a8f1475fb9d /Objects/moduleobject.c | |
parent | 7a01508bbe5fbe5dd31d395d3b7074a643b689a3 (diff) | |
download | cpython-7fbce56a57bd8ef45191eb8e4abb4b5d8edb1384.zip cpython-7fbce56a57bd8ef45191eb8e4abb4b5d8edb1384.tar.gz cpython-7fbce56a57bd8ef45191eb8e4abb4b5d8edb1384.tar.bz2 |
Issue #12946: Remove dead code in PyModule_GetDict
PyModule_NewObject already sets md_dict to PyDict_New():
m->md_dict = PyDict_New();
Diffstat (limited to 'Objects/moduleobject.c')
-rw-r--r-- | Objects/moduleobject.c | 3 |
1 files changed, 1 insertions, 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; } |