gh-116029: Fix unused function warning on macOS (#116340)

This commit is contained in:
Sam Gross 2024-03-04 22:06:21 -05:00 committed by GitHub
parent 88b5c665ee
commit 58c7919d05
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -1238,10 +1238,10 @@ start:
return ix; return ix;
} }
#ifdef Py_GIL_DISABLED
static inline void static inline void
ensure_shared_on_read(PyDictObject *mp) ensure_shared_on_read(PyDictObject *mp)
{ {
#ifdef Py_GIL_DISABLED
if (!_Py_IsOwnedByCurrentThread((PyObject *)mp) && !IS_DICT_SHARED(mp)) { if (!_Py_IsOwnedByCurrentThread((PyObject *)mp) && !IS_DICT_SHARED(mp)) {
// The first time we access a dict from a non-owning thread we mark it // The first time we access a dict from a non-owning thread we mark it
// as shared. This ensures that a concurrent resize operation will // as shared. This ensures that a concurrent resize operation will
@ -1253,8 +1253,8 @@ ensure_shared_on_read(PyDictObject *mp)
} }
Py_END_CRITICAL_SECTION(); Py_END_CRITICAL_SECTION();
} }
#endif
} }
#endif
static inline void static inline void
ensure_shared_on_resize(PyDictObject *mp) ensure_shared_on_resize(PyDictObject *mp)