Skip to content

Commit e1aaf45

Browse files
Do not share pointer_type via StgInfo clone
Co-authored-by: neonene <[email protected]>
1 parent f8139ff commit e1aaf45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Modules/_ctypes/stgdict.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ PyCStgInfo_clone(StgInfo *dst_info, StgInfo *src_info)
4040
Py_XINCREF(dst_info->converters);
4141
Py_XINCREF(dst_info->restype);
4242
Py_XINCREF(dst_info->checker);
43-
Py_XINCREF(dst_info->pointer_type);
43+
dst_info->pointer_type = NULL; // the cache cannot be shared
4444
Py_XINCREF(dst_info->module);
4545

4646
if (src_info->format) {

0 commit comments

Comments
 (0)