commit | 7fbce56a57bd8ef45191eb8e4abb4b5d8edb1384 | [log] [tgz] |
---|---|---|
author | Berker Peksag <berker.peksag@gmail.com> | Fri Aug 19 12:00:13 2016 +0300 |
committer | Berker Peksag <berker.peksag@gmail.com> | Fri Aug 19 12:00:13 2016 +0300 |
tree | e4ca090644c0e16ec58a79258cb58a8f1475fb9d | |
parent | 7a01508bbe5fbe5dd31d395d3b7074a643b689a3 [diff] |
Issue #12946: Remove dead code in PyModule_GetDict PyModule_NewObject already sets md_dict to PyDict_New(): m->md_dict = PyDict_New();
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 @@ return NULL; } d = ((PyModuleObject *)m) -> md_dict; - if (d == NULL) - ((PyModuleObject *)m) -> md_dict = d = PyDict_New(); + assert(d != NULL); return d; }