cpython/Lib/ctypes/test
Serhiy Storchaka 36153494f1
[3.11] gh-62260: Fix ctypes.Structure subclassing with multiple layers (GH-13374) (GH-113624)
The length field of StgDictObject for Structure class contains now
the total number of items in ffi_type_pointer.elements (excluding
the trailing null).

The old behavior of using the number of elements in the parent class can
cause the array to be truncated when it is copied, especially when there
are multiple layers of subclassing.

(cherry picked from commit 5f3cc90a12)

Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
2024-01-01 16:46:07 +00:00
..
__init__.py bpo-40275: Use new test.support helper submodules in tests (GH-21315) 2020-07-06 11:15:08 +02:00
__main__.py
test_anon.py bpo-31490: Fix an assertion failure in ctypes in case an _anonymous_ attr is defined only outside _fields_. (#3615) 2017-09-17 13:45:38 +03:00
test_array_in_pointer.py
test_arrays.py [3.11] Enable ruff on several more files in Lib/test (#110929) (#110935) 2023-10-16 23:17:59 +03:00
test_as_parameter.py [3.11] gh-105751: Remove obsolete object base class in some ctypes tests (GH-107460) (#107502) 2023-07-31 16:40:47 +02:00
test_bitfields.py bpo-46913: Skip test_ctypes.test_shorts() on UBSan (GH-31674) 2022-03-04 00:41:57 +01:00
test_buffers.py bpo-19865: ctypes.create_unicode_buffer() supports non-BMP strings on Windows (GH-14081) 2019-06-14 17:53:59 +02:00
test_bytes.py bpo-35384: The repr of ctypes.CArgObject no longer fails for non-ascii character. (GH-10863) 2018-12-06 11:16:24 +02:00
test_byteswap.py [3.11] gh-105751, test_ctypes: Remove disabled tests (GH-105826) (#107484) 2023-07-31 10:28:45 +02:00
test_callbacks.py [3.11] gh-105751: Remove obsolete object base class in some ctypes tests (GH-107460) (#107502) 2023-07-31 16:40:47 +02:00
test_cast.py bpo-21983: Fix a crash in ctypes.cast() when passed a ctypes structured data type (GH-3859) 2018-05-09 14:38:56 -07:00
test_cfuncs.py gh-84461: Fix ctypes and test_ctypes on Emscripten (GH-94142) 2022-06-24 04:17:21 -07:00
test_checkretval.py
test_delattr.py
test_errno.py bpo-31370: Remove support for threads-less builds (#3385) 2017-09-07 18:56:24 +02:00
test_find.py bpo-43651: PEP 597: Fix EncodingWarning in some tests (GH-25145) 2021-04-04 09:01:23 +09:00
test_frombuffer.py bpo-28129: fix ctypes crashes (#386) 2017-03-02 18:42:40 +01:00
test_funcptr.py bpo-28129: fix ctypes crashes (#386) 2017-03-02 18:42:40 +01:00
test_functions.py [3.11] Enable ruff on several more files in Lib/test (#110929) (#110935) 2023-10-16 23:17:59 +03:00
test_incomplete.py
test_init.py
test_internals.py
test_keeprefs.py [3.11] Revert "gh-46376: Return existing pointer when possible in ctypes (GH-107131) (GH-107488)" (#108412) 2023-08-24 13:26:19 +02:00
test_libc.py
test_loading.py Update URLs in comments and metadata to use HTTPS (GH-27458) 2021-07-30 15:54:46 +02:00
test_macholib.py gh-91265: Make old ctypes.macholib tests runned by python -m test (gh-32094) 2022-04-18 09:27:09 +02:00
test_memfunctions.py
test_numbers.py [3.11] gh-105751: Remove obsolete object base class in some ctypes tests (GH-107460) (#107502) 2023-07-31 16:40:47 +02:00
test_objects.py Issue #23277: Remove unused sys and os imports 2016-04-24 07:31:42 +03:00
test_parameters.py [3.11] gh-105751: Remove obsolete object base class in some ctypes tests (GH-107460) (#107502) 2023-07-31 16:40:47 +02:00
test_pep3118.py [3.11] gh-76963: PEP3118 itemsize of an empty ctypes array should not be 0 (GH-5576) (GH-100452) 2022-12-23 08:56:20 +00:00
test_pickling.py Issue #22777: Test pickling with all protocols. 2014-12-15 14:03:42 +02:00
test_pointers.py bpo-28129: fix ctypes crashes (#386) 2017-03-02 18:42:40 +01:00
test_prototypes.py
test_python_api.py bpo-46584: remove check for py2.3 from ctypes/test_python_api (GH-31024) 2022-02-01 05:56:25 -08:00
test_random_things.py bpo-40795: ctypes calls unraisablehook with an exception (GH-20452) 2020-05-28 00:38:12 +02:00
test_refcounts.py GH-81061: Fix refcount issue when returning None from a ctypes.py_object callback (GH-13364) 2023-01-09 08:06:17 -08:00
test_repr.py
test_returnfuncptrs.py Issue #23277: Remove unused sys and os imports 2016-04-24 07:31:42 +03:00
test_simplesubclasses.py
test_sizes.py Issue #23277: Remove unused sys and os imports 2016-04-24 07:31:42 +03:00
test_slicing.py bpo-30708: Check for null characters in PyUnicode_AsWideCharString(). (#2285) 2017-06-27 16:03:14 +03:00
test_stringptr.py bpo-36253: Remove use after free reference in ctypes test suite (GH-12257) 2019-09-10 08:20:15 -07:00
test_strings.py bpo-45082: Cleanup ctypes.c_buffer alias (GH-28129) 2021-09-02 19:02:03 +02:00
test_struct_fields.py gh-78878: Fix crash when creating an instance of _ctypes.CField (GH-14837) 2022-12-21 10:02:05 -08:00
test_structures.py [3.11] gh-62260: Fix ctypes.Structure subclassing with multiple layers (GH-13374) (GH-113624) 2024-01-01 16:46:07 +00:00
test_unaligned_structures.py bpo-40795: ctypes calls unraisablehook with an exception (GH-20452) 2020-05-28 00:38:12 +02:00
test_unicode.py bpo-32745: Fix a regression in the handling of ctypes' c_wchar_p type (#8721) 2021-05-02 12:40:01 +02:00
test_values.py bpo-46748: Fix ctypes test_frozentable() (GH-31600) 2022-02-27 00:25:46 +01:00
test_varsize_struct.py
test_win32.py bpo-35947: Update Windows to the current version of libffi (GH-11797) 2019-03-29 16:30:10 -07:00
test_wintypes.py bpo-16396: Allow wintypes to be imported on non-Windows systems. (GH-21394) 2020-10-19 23:06:05 +01:00