Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Document PyType_SUPPORTS_WEAKREFS()
  • Loading branch information
ZeroIntensity committed Nov 11, 2025
commit f20972630c4dc0284e4ec9b2f50ce37dac9ad5ba
8 changes: 8 additions & 0 deletions Doc/c-api/type.rst
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,14 @@ Type Objects

.. versionadded:: 3.12

.. c:function:: int PyType_SUPPORTS_WEAKREFS(PyTypeObject *type)

Return true if instances of *type* supports creating weak references, false
Comment thread
ZeroIntensity marked this conversation as resolved.
Outdated
otherwise. This function always succeeds. *type* must not be ``NULL``.

.. seealso::
* :ref:`weakrefobjects`
* :py:mod:`weakref`

Comment thread
StanFromIreland marked this conversation as resolved.
Creating Heap-Allocated Types
.............................
Expand Down