Skip to content

Commit 85fb3ae

Browse files
author
Stefan Behnel
committed
Give internal helper function a local name that does not resemble (existing) API names.
Suggested by Serhiy Storchaka.
1 parent 66648dd commit 85fb3ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

Objects/typeobject.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2946,7 +2946,7 @@ PyType_GetSlot(PyTypeObject *type, int slot)
29462946
This returns a borrowed reference, and might set an exception.
29472947
'error' is set to: -1: error with exception; 1: error without exception; 0: ok */
29482948
static PyObject *
2949-
_PyType_LookupUncached(PyTypeObject *type, PyObject *name, int *error)
2949+
find_name_in_mro(PyTypeObject *type, PyObject *name, int *error)
29502950
{
29512951
Py_ssize_t i, n;
29522952
PyObject *mro, *res, *base, *dict;
@@ -3026,7 +3026,7 @@ _PyType_Lookup(PyTypeObject *type, PyObject *name)
30263026
}
30273027
}
30283028

3029-
res = _PyType_LookupUncached(type, name, &error);
3029+
res = find_name_in_mro(type, name, &error);
30303030
/* Only put NULL results into cache if there was no error. */
30313031
if (error) {
30323032
/* It's not ideal to clear the error condition,
@@ -7003,7 +7003,7 @@ update_one_slot(PyTypeObject *type, slotdef *p)
70037003
}
70047004
do {
70057005
/* Use faster uncached lookup as we won't get any cache hits during type setup. */
7006-
descr = _PyType_LookupUncached(type, p->name_strobj, &error);
7006+
descr = find_name_in_mro(type, p->name_strobj, &error);
70077007
if (descr == NULL) {
70087008
if (error == -1) {
70097009
/* It is unlikely by not impossible that there has been an exception

0 commit comments

Comments
 (0)