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

Skip to content

Commit 60e5f5e

Browse files
author
Thomas Heller
committed
Remove the Py_TPFLAGS_HAVE_GC from the _ctypes.COMError type.
Fixes issue #4433; reviewed by Benjamin Peterson.
1 parent bea0081 commit 60e5f5e

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

Misc/NEWS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ Core and Builtins
2424
Library
2525
-------
2626

27+
- Issue #4433: Fixed an access violation when garbage collecting
28+
_ctypes.COMError instances.
29+
2730
- Issue #4429: Fixed UnicodeDecodeError in ctypes.
2831

2932
- Issue #4373: Corrected a potential reference leak in the pickle module and

Modules/_ctypes/_ctypes.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5097,8 +5097,7 @@ static PyTypeObject PyComError_Type = {
50975097
0, /* tp_getattro */
50985098
0, /* tp_setattro */
50995099
0, /* tp_as_buffer */
5100-
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE
5101-
| Py_TPFLAGS_HAVE_GC, /* tp_flags */
5100+
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
51025101
PyDoc_STR(comerror_doc), /* tp_doc */
51035102
0, /* tp_traverse */
51045103
0, /* tp_clear */

0 commit comments

Comments
 (0)