We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1c4a223 commit 08ddad9Copy full SHA for 08ddad9
src/sage/cpython/cython_metaclass.h
@@ -53,9 +53,10 @@ static CYTHON_INLINE int Sage_PyType_Ready(PyTypeObject* t)
53
return r;
54
55
#if PY_VERSION_HEX >= 0x03050000
56
- // Cython 3 sets Py_TPFLAGS_HEAPSIZE before calling PyType_Ready,
57
- // and resets just after the call. We need to do the same, or it may
58
- // end up with illegal memory accesses.
+ // Cython 3 sets Py_TPFLAGS_HEAPTYPE before calling PyType_Ready,
+ // and resets just after the call. We need to reset it earlier,
+ // since otherwise the call to metaclass.__init__ below may have
59
+ // illegal memory accesses.
60
// See also:
61
// https://github.com/cython/cython/issues/3603
62
t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;
0 commit comments