Skip to content

Commit 5768347

Browse files
Update news and whatsnew
1 parent fc93bc8 commit 5768347

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Doc/whatsnew/3.14.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,8 @@ ctypes
532532

533533
* Move :func:`ctypes.POINTER` types cache from the global ``_pointer_type_cache``
534534
to the corresponding :mod:`ctypes` types. This will stop the cache from
535-
growing without limits in some situations.
535+
growing without limits in some situations. Also :mod:`ctypes` pointer types
536+
can be accessed with ``__pointer_type__`` attribute from corresponding type.
536537
(Contributed by Sergey Miryanov in :gh:`100926`).
537538

538539
datetime
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,7 @@
11
Move :func:`ctypes.POINTER` types cache from the global ``_pointer_type_cache``
22
to the corresponding :mod:`ctypes` types to avoid unlimited growth of the cache.
3+
As from now, :mod:`ctypes` pointer types can be accessed with
4+
``__pointer_type__`` attribute. :func:`ctypes.POINTER` checks this attribute
5+
first before creating a new pointer type, so if needed to mimic :mod:`ctypes`
6+
pointer type then type should have this attribute
7+
(see PyCSimpleTypeAsMetaclassTest for example).

0 commit comments

Comments
 (0)