Skip to content

Commit

Permalink
Merge branch 'pybind:master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
sun1638650145 authored Feb 4, 2025
2 parents a5e8c82 + 8862cd4 commit d36d62c
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1124,7 +1124,7 @@ jobs:
uses: jwlawson/[email protected]

- name: Install ninja-build tool
uses: seanmiddleditch/gha-setup-ninja@v5
uses: seanmiddleditch/gha-setup-ninja@v6

- name: Run pip installs
run: |
Expand Down
6 changes: 3 additions & 3 deletions include/pybind11/detail/class.h
Original file line number Diff line number Diff line change
Expand Up @@ -574,9 +574,9 @@ 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
type->tp_dictoffset = type->tp_basicsize; // place dict at the end
type->tp_basicsize += (ssize_t) sizeof(PyObject *); // and allocate enough space for it
#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
type->tp_flags |= Py_TPFLAGS_MANAGED_DICT;
#endif
Expand Down

0 comments on commit d36d62c

Please sign in to comment.