cpython/Lib/ctypes
Victor Stinner 96b4087ce7
bpo-37140: Fix StructUnionType_paramfunc() (GH-15612)
Fix a ctypes regression of Python 3.8. When a ctypes.Structure is
passed by copy to a function, ctypes internals created a temporary
object which had the side effect of calling the structure finalizer
(__del__) twice. The Python semantics requires a finalizer to be
called exactly once. Fix ctypes internals to no longer call the
finalizer twice.

Create a new internal StructParam_Type which is only used by
_ctypes_callproc() to call PyMem_Free(ptr) on Py_DECREF(argument).
StructUnionType_paramfunc() creates such object.
2019-08-30 14:30:33 +02:00
..
macholib Show what's changed when Travis fails regen check (GH-2095) 2017-06-10 23:04:36 -05:00
test bpo-37140: Fix StructUnionType_paramfunc() (GH-15612) 2019-08-30 14:30:33 +02:00
__init__.py bpo-19865: ctypes.create_unicode_buffer() supports non-BMP strings on Windows (GH-14081) 2019-06-14 17:53:59 +02:00
_aix.py bpo-34558: Add missing parentheses in _aix.py (GH-9017) 2018-08-31 19:31:07 -07:00
_endian.py
util.py bpo-33281: Fix ctypes.util.find_library regression on macOS (GH-6625) 2018-05-01 22:31:36 -04:00
wintypes.py