gh-121266: Remove Py_ALWAYS_INLINE in dictobject.c (#121493)

compare_unicode_generic(), compare_unicode_unicode() and
compare_generic() are callbacks used by do_lookup(). When enabling
assertions, it's not possible to inline these functions.
This commit is contained in:
Victor Stinner 2024-07-18 08:19:32 +02:00 committed by GitHub
parent 81fd625b5c
commit c5a6b9afd8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 3 deletions

View File

@ -1092,7 +1092,7 @@ do_lookup(PyDictObject *mp, PyDictKeysObject *dk, PyObject *key, Py_hash_t hash,
Py_UNREACHABLE(); Py_UNREACHABLE();
} }
static inline Py_ALWAYS_INLINE int static inline int
compare_unicode_generic(PyDictObject *mp, PyDictKeysObject *dk, compare_unicode_generic(PyDictObject *mp, PyDictKeysObject *dk,
void *ep0, Py_ssize_t ix, PyObject *key, Py_hash_t hash) void *ep0, Py_ssize_t ix, PyObject *key, Py_hash_t hash)
{ {
@ -1127,7 +1127,7 @@ unicodekeys_lookup_generic(PyDictObject *mp, PyDictKeysObject* dk, PyObject *key
return do_lookup(mp, dk, key, hash, compare_unicode_generic); return do_lookup(mp, dk, key, hash, compare_unicode_generic);
} }
static inline Py_ALWAYS_INLINE int static inline int
compare_unicode_unicode(PyDictObject *mp, PyDictKeysObject *dk, compare_unicode_unicode(PyDictObject *mp, PyDictKeysObject *dk,
void *ep0, Py_ssize_t ix, PyObject *key, Py_hash_t hash) void *ep0, Py_ssize_t ix, PyObject *key, Py_hash_t hash)
{ {
@ -1148,7 +1148,7 @@ unicodekeys_lookup_unicode(PyDictKeysObject* dk, PyObject *key, Py_hash_t hash)
return do_lookup(NULL, dk, key, hash, compare_unicode_unicode); return do_lookup(NULL, dk, key, hash, compare_unicode_unicode);
} }
static inline Py_ALWAYS_INLINE int static inline int
compare_generic(PyDictObject *mp, PyDictKeysObject *dk, compare_generic(PyDictObject *mp, PyDictKeysObject *dk,
void *ep0, Py_ssize_t ix, PyObject *key, Py_hash_t hash) void *ep0, Py_ssize_t ix, PyObject *key, Py_hash_t hash)
{ {