Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfa84e5f

Browse files
authored
gh-110481: fix 'unused function' warning foris_shared_refcnt_dead. (gh-111974)
Fix 'unused function' warning for `is_shared_refcnt_dead`.The `is_shared_refcnt_dead` function is only used if `Py_REF_DEBUG` is set.
1 parentae8116c commitfa84e5f

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

‎Objects/object.c‎

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -297,15 +297,17 @@ _Py_DecRef(PyObject *o)
297297
}
298298

299299
#ifdefPy_NOGIL
300+
# ifdefPy_REF_DEBUG
300301
staticinlineint
301302
is_shared_refcnt_dead(Py_ssize_tshared)
302303
{
303-
#ifSIZEOF_SIZE_T==8
304+
#ifSIZEOF_SIZE_T==8
304305
returnshared== (Py_ssize_t)0xDDDDDDDDDDDDDDDD;
305-
#else
306+
#else
306307
returnshared== (Py_ssize_t)0xDDDDDDDD;
307-
#endif
308+
#endif
308309
}
310+
# endif
309311

310312
void
311313
_Py_DecRefSharedDebug(PyObject*o,constchar*filename,intlineno)
@@ -412,7 +414,7 @@ _Py_ExplicitMergeRefcount(PyObject *op, Py_ssize_t extra)
412414
_Py_atomic_store_uintptr_relaxed(&op->ob_tid,0);
413415
returnrefcnt;
414416
}
415-
#endif
417+
#endif/* Py_NOGIL */
416418

417419

418420
/**************************************/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp