mirror of
https://github.com/python/cpython.git
synced 2026-04-20 10:51:00 +00:00
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.
(cherry picked from commit
|
||
|---|---|---|
| .. | ||
| __init__.py | ||
| __main__.py | ||
| test_anon.py | ||
| test_array_in_pointer.py | ||
| test_arrays.py | ||
| test_as_parameter.py | ||
| test_bitfields.py | ||
| test_buffers.py | ||
| test_bytes.py | ||
| test_byteswap.py | ||
| test_callbacks.py | ||
| test_cast.py | ||
| test_cfuncs.py | ||
| test_checkretval.py | ||
| test_delattr.py | ||
| test_errno.py | ||
| test_find.py | ||
| test_frombuffer.py | ||
| test_funcptr.py | ||
| test_functions.py | ||
| test_incomplete.py | ||
| test_init.py | ||
| test_internals.py | ||
| test_keeprefs.py | ||
| test_libc.py | ||
| test_loading.py | ||
| test_macholib.py | ||
| test_memfunctions.py | ||
| test_numbers.py | ||
| test_objects.py | ||
| test_parameters.py | ||
| test_pep3118.py | ||
| test_pickling.py | ||
| test_pointers.py | ||
| test_prototypes.py | ||
| test_python_api.py | ||
| test_random_things.py | ||
| test_refcounts.py | ||
| test_repr.py | ||
| test_returnfuncptrs.py | ||
| test_simplesubclasses.py | ||
| test_sizes.py | ||
| test_slicing.py | ||
| test_stringptr.py | ||
| test_strings.py | ||
| test_struct_fields.py | ||
| test_structures.py | ||
| test_unaligned_structures.py | ||
| test_unicode.py | ||
| test_values.py | ||
| test_varsize_struct.py | ||
| test_win32.py | ||
| test_wintypes.py | ||