diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-15 19:02:09 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2011-07-15 19:02:09 (GMT) |
commit | 874d65afaef54993eb5779c31611f5f3baa995e2 (patch) | |
tree | e18a6a7fa76053aa6810f805ae6f5d0ed8cca544 /Modules/_pickle.c | |
parent | 8f629059db0b39caedd2d7ddde8a8a53e1bdea54 (diff) | |
parent | 8391cf4e1d73683795e51ac5ce8ee9e61eea389d (diff) | |
download | cpython-874d65afaef54993eb5779c31611f5f3baa995e2.zip cpython-874d65afaef54993eb5779c31611f5f3baa995e2.tar.gz cpython-874d65afaef54993eb5779c31611f5f3baa995e2.tar.bz2 |
Issue #11321: Fix a crash with multiple imports of the _pickle module when
embedding Python. Patch by Andreas Stührk.
Diffstat (limited to 'Modules/_pickle.c')
-rw-r--r-- | Modules/_pickle.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Modules/_pickle.c b/Modules/_pickle.c index 822d03c..06bce1e 100644 --- a/Modules/_pickle.c +++ b/Modules/_pickle.c @@ -6338,8 +6338,10 @@ PyInit__pickle(void) if (m == NULL) return NULL; + Py_INCREF(&Pickler_Type); if (PyModule_AddObject(m, "Pickler", (PyObject *)&Pickler_Type) < 0) return NULL; + Py_INCREF(&Unpickler_Type); if (PyModule_AddObject(m, "Unpickler", (PyObject *)&Unpickler_Type) < 0) return NULL; |