Skip to content

Commit 9b5b410

Browse files
authored
[mypyc] Add comment about incref/decref and free-threaded builds (#19155)
Follow-up to #19127.
1 parent 29e125f commit 9b5b410

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

mypyc/lib-rt/mypyc_util.h

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
//
3939
// Py_INCREF and other CPython operations check for immortality. This
4040
// can be expensive when we know that an object cannot be immortal.
41+
//
42+
// This optimization cannot be performed in free-threaded mode so we
43+
// fall back to just calling the normal incref/decref operations.
4144

4245
static inline void CPy_INCREF_NO_IMM(PyObject *op)
4346
{

0 commit comments

Comments
 (0)