Skip to content

Commit 58c7919

Browse files
authored
gh-116029: Fix unused function warning on macOS (#116340)
1 parent 88b5c66 commit 58c7919

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Objects/dictobject.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1238,10 +1238,10 @@ _Py_dict_lookup(PyDictObject *mp, PyObject *key, Py_hash_t hash, PyObject **valu
12381238
return ix;
12391239
}
12401240

1241+
#ifdef Py_GIL_DISABLED
12411242
static inline void
12421243
ensure_shared_on_read(PyDictObject *mp)
12431244
{
1244-
#ifdef Py_GIL_DISABLED
12451245
if (!_Py_IsOwnedByCurrentThread((PyObject *)mp) && !IS_DICT_SHARED(mp)) {
12461246
// The first time we access a dict from a non-owning thread we mark it
12471247
// as shared. This ensures that a concurrent resize operation will
@@ -1253,8 +1253,8 @@ ensure_shared_on_read(PyDictObject *mp)
12531253
}
12541254
Py_END_CRITICAL_SECTION();
12551255
}
1256-
#endif
12571256
}
1257+
#endif
12581258

12591259
static inline void
12601260
ensure_shared_on_resize(PyDictObject *mp)

0 commit comments

Comments
 (0)