Skip to content

Commit d36d62c

Browse files
Merge branch 'pybind:master' into master
2 parents a5e8c82 + 8862cd4 commit d36d62c

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

.github/workflows/ci.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1124,7 +1124,7 @@ jobs:
11241124
uses: jwlawson/[email protected]
11251125

11261126
- name: Install ninja-build tool
1127-
uses: seanmiddleditch/gha-setup-ninja@v5
1127+
uses: seanmiddleditch/gha-setup-ninja@v6
11281128

11291129
- name: Run pip installs
11301130
run: |

include/pybind11/detail/class.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -574,9 +574,9 @@ extern "C" inline int pybind11_clear(PyObject *self) {
574574
inline void enable_dynamic_attributes(PyHeapTypeObject *heap_type) {
575575
auto *type = &heap_type->ht_type;
576576
type->tp_flags |= Py_TPFLAGS_HAVE_GC;
577-
#if PY_VERSION_HEX < 0x030B0000
578-
type->tp_dictoffset = type->tp_basicsize; // place dict at the end
579-
type->tp_basicsize += (ssize_t) sizeof(PyObject *); // and allocate enough space for it
577+
#if PY_VERSION_HEX < 0x030B0000 || defined(PYPY_VERSION) // For PyPy see PR #5508
578+
type->tp_dictoffset = type->tp_basicsize; // place dict at the end
579+
type->tp_basicsize += (ssize_t) sizeof(PyObject *); // and allocate enough space for it
580580
#else
581581
type->tp_flags |= Py_TPFLAGS_MANAGED_DICT;
582582
#endif

0 commit comments

Comments
 (0)