https://github.com/python/cpython/commit/e458268143317ed5b2b2166506841c36c6d1e20b
commit: e458268143317ed5b2b2166506841c36c6d1e20b
branch: 3.13
author: Miss Islington (bot) <[email protected]>
committer: vstinner <[email protected]>
date: 2024-07-21T17:11:12Z
summary:

[3.13] gh-121266: Remove Py_ALWAYS_INLINE in dictobject.c (GH-121493) (#122095)

gh-121266: Remove Py_ALWAYS_INLINE in dictobject.c (GH-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.
(cherry picked from commit c5a6b9afd82cad3f6abd9dc71cd5fdd5781a53f5)

Co-authored-by: Victor Stinner <[email protected]>

files:
M Objects/dictobject.c

diff --git a/Objects/dictobject.c b/Objects/dictobject.c
index 1656a7df400469..431c4965bdec09 100644
--- a/Objects/dictobject.c
+++ b/Objects/dictobject.c
@@ -1092,7 +1092,7 @@ do_lookup(PyDictObject *mp, PyDictKeysObject *dk, 
PyObject *key, Py_hash_t hash,
     Py_UNREACHABLE();
 }
 
-static inline Py_ALWAYS_INLINE int
+static inline int
 compare_unicode_generic(PyDictObject *mp, PyDictKeysObject *dk,
                         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);
 }
 
-static inline Py_ALWAYS_INLINE int
+static inline int
 compare_unicode_unicode(PyDictObject *mp, PyDictKeysObject *dk,
                         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);
 }
 
-static inline Py_ALWAYS_INLINE int
+static inline int
 compare_generic(PyDictObject *mp, PyDictKeysObject *dk,
                 void *ep0, Py_ssize_t ix, PyObject *key, Py_hash_t hash)
 {

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to