gh-134786: raise error if Py_TPFLAGS_MANAGED_WEAKREF or Py_TPFLAGS_MANAGED_DICT is used without Py_TPFLAGS_HAVE_GC set (#135863)

This commit is contained in:
Sergey Miryanov 2025-11-02 16:04:49 +05:00 committed by GitHub
parent d12cbf2865
commit da65f38a94
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 72 additions and 2 deletions

View file

@ -529,7 +529,7 @@ given type object has a specified feature.
#define Py_TPFLAGS_INLINE_VALUES (1 << 2)
/* Placement of weakref pointers are managed by the VM, not by the type.
* The VM will automatically set tp_weaklistoffset.
* The VM will automatically set tp_weaklistoffset. Implies Py_TPFLAGS_HAVE_GC.
*/
#define Py_TPFLAGS_MANAGED_WEAKREF (1 << 3)