Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 359bd4f

Browse files
ZackerySpytzmethane
authored andcommitted
bpo-18372: Add missing PyObject_GC_Track() calls in the pickle module (GH-8505)
1 parent 09415ff commit 359bd4f

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
Add missing :c:func:`PyObject_GC_Track` calls in the :mod:`pickle` module.
2+
Patch by Zackery Spytz.

Modules/_pickle.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,8 @@ _Pickler_New(void)
11191119
Py_DECREF(self);
11201120
return NULL;
11211121
}
1122+
1123+
PyObject_GC_Track(self);
11221124
return self;
11231125
}
11241126

@@ -1496,6 +1498,7 @@ _Unpickler_New(void)
14961498
return NULL;
14971499
}
14981500

1501+
PyObject_GC_Track(self);
14991502
return self;
15001503
}
15011504

0 commit comments

Comments
 (0)