Skip to content

Commit 102bb08

Browse files
committed
Remove code inside 'PYPY_VERSION_NUM < 0x06000000' preprocessor if branch
1 parent ce1a07e commit 102bb08

File tree

1 file changed

+0
-5
lines changed

1 file changed

+0
-5
lines changed

include/pybind11/detail/class.h

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -475,11 +475,6 @@ extern "C" inline int pybind11_clear(PyObject *self) {
475475
/// Give instances of this type a `__dict__` and opt into garbage collection.
476476
inline void enable_dynamic_attributes(PyHeapTypeObject *heap_type) {
477477
auto type = &heap_type->ht_type;
478-
#if defined(PYPY_VERSION) && (PYPY_VERSION_NUM < 0x06000000)
479-
pybind11_fail(std::string(type->tp_name) + ": dynamic attributes are "
480-
"currently not supported in "
481-
"conjunction with PyPy!");
482-
#endif
483478
type->tp_flags |= Py_TPFLAGS_HAVE_GC;
484479
type->tp_dictoffset = type->tp_basicsize; // place dict at the end
485480
type->tp_basicsize += (ssize_t)sizeof(PyObject *); // and allocate enough space for it

0 commit comments

Comments
 (0)