From 6e590e4aa89cf7fb9902cc13e15ea39363b04297 Mon Sep 17 00:00:00 2001 From: Matti Picus Date: Mon, 3 Feb 2025 06:00:39 +1100 Subject: [PATCH] add a comment (from review) --- include/pybind11/detail/class.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/pybind11/detail/class.h b/include/pybind11/detail/class.h index e6a501699d..8a0414c7ec 100644 --- a/include/pybind11/detail/class.h +++ b/include/pybind11/detail/class.h @@ -574,7 +574,7 @@ extern "C" inline int pybind11_clear(PyObject *self) { inline void enable_dynamic_attributes(PyHeapTypeObject *heap_type) { auto *type = &heap_type->ht_type; type->tp_flags |= Py_TPFLAGS_HAVE_GC; -#if PY_VERSION_HEX < 0x030B0000 || defined(PYPY_VERSION) +#if PY_VERSION_HEX < 0x030B0000 || defined(PYPY_VERSION) // For PyPy see PR #5508 type->tp_dictoffset = type->tp_basicsize; // place dict at the end type->tp_basicsize += (ssize_t) sizeof(PyObject *); // and allocate enough space for it #else