We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a8d74c0 commit 8d7c6dcCopy full SHA for 8d7c6dc
1 file changed
Modules/_pickle.c
@@ -12,6 +12,7 @@
12
#include "pycore_bytesobject.h" // _PyBytesWriter
13
#include "pycore_ceval.h" // _Py_EnterRecursiveCall()
14
#include "pycore_critical_section.h" // Py_BEGIN_CRITICAL_SECTION()
15
+#include "pycore_dict.h" // _PyDict_SetItem_Take2()
16
#include "pycore_long.h" // _PyLong_AsByteArray()
17
#include "pycore_moduleobject.h" // _PyModule_GetState()
18
#include "pycore_object.h" // _PyNone_Type
@@ -5147,9 +5148,7 @@ _pickle_PicklerMemoProxy_copy_impl(PicklerMemoProxyObject *self)
5147
5148
Py_DECREF(key);
5149
goto error;
5150
}
- status = PyDict_SetItem(new_memo, key, value);
5151
- Py_DECREF(key);
5152
- Py_DECREF(value);
+ status = _PyDict_SetItem_Take2((PyDictObject *)new_memo, key, value);
5153
if (status < 0)
5154
5155
0 commit comments