Skip to content

Commit 08ddad9

Browse files
committed
rephrase comments in cython_metaclass.h
1 parent 1c4a223 commit 08ddad9

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/sage/cpython/cython_metaclass.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,9 +53,10 @@ static CYTHON_INLINE int Sage_PyType_Ready(PyTypeObject* t)
5353
return r;
5454

5555
#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.
56+
// Cython 3 sets Py_TPFLAGS_HEAPTYPE before calling PyType_Ready,
57+
// and resets just after the call. We need to reset it earlier,
58+
// since otherwise the call to metaclass.__init__ below may have
59+
// illegal memory accesses.
5960
// See also:
6061
// https://github.com/cython/cython/issues/3603
6162
t->tp_flags &= ~Py_TPFLAGS_HEAPTYPE;

0 commit comments

Comments
 (0)