[Python-checkins] bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914)

Miss Islington (bot) webhook-mailer at python.org
Wed Dec 5 02:51:19 EST 2018


https://github.com/python/cpython/commit/afb07fccf013f20b89b33516f126695388be47b9
commit: afb07fccf013f20b89b33516f126695388be47b9
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018年12月04日T23:51:15-08:00
summary:
bpo-35414: Add a missing Py_INCREF(Py_None) in PyState_RemoveModule(). (GH-10914)
(cherry picked from commit 2a893430c9c8378cbdfac95895a64fa07aaff9ed)
Co-authored-by: Zackery Spytz <zspytz at gmail.com>
files:
M Python/pystate.c
diff --git a/Python/pystate.c b/Python/pystate.c
index c0e088055a60..71494daa471a 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -377,6 +377,7 @@ PyState_RemoveModule(struct PyModuleDef* def)
 Py_FatalError("PyState_RemoveModule: Module index out of bounds.");
 return -1;
 }
+ Py_INCREF(Py_None);
 return PyList_SetItem(state->modules_by_index, index, Py_None);
 }
 


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /