summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorCarl Meyer <carl@oddbird.net>2023-04-28 13:20:50 -0600
committerGitHub <noreply@github.com>2023-04-28 19:20:50 +0000
commitebf97c50f25d61e15671a4658f5718f214c35a98 (patch)
tree47aae8fbc0e66dbae3186a5a72b7d3995ddedbd3 /Python
parent83aa496f81f86b46caf249a8ff7e168e6b27622d (diff)
downloadcpython-git-ebf97c50f25d61e15671a4658f5718f214c35a98.tar.gz
gh-103978: avoid using 'class' as an identifier (#103979)
Diffstat (limited to 'Python')
-rw-r--r--Python/specialize.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/specialize.c b/Python/specialize.c
index 33a3c4561c..fbdb435082 100644
--- a/Python/specialize.c
+++ b/Python/specialize.c
@@ -515,7 +515,7 @@ specialize_module_load_attr(
/* Attribute specialization */
void
-_Py_Specialize_LoadSuperAttr(PyObject *global_super, PyObject *class, PyObject *self,
+_Py_Specialize_LoadSuperAttr(PyObject *global_super, PyObject *cls, PyObject *self,
_Py_CODEUNIT *instr, PyObject *name, int load_method) {
assert(ENABLE_SPECIALIZATION);
assert(_PyOpcode_Caches[LOAD_SUPER_ATTR] == INLINE_CACHE_ENTRIES_LOAD_SUPER_ATTR);
@@ -528,11 +528,11 @@ _Py_Specialize_LoadSuperAttr(PyObject *global_super, PyObject *class, PyObject *
SPECIALIZATION_FAIL(LOAD_SUPER_ATTR, SPEC_FAIL_SUPER_SHADOWED);
goto fail;
}
- if (!PyType_Check(class)) {
+ if (!PyType_Check(cls)) {
SPECIALIZATION_FAIL(LOAD_SUPER_ATTR, SPEC_FAIL_SUPER_BAD_CLASS);
goto fail;
}
- PyTypeObject *tp = (PyTypeObject *)class;
+ PyTypeObject *tp = (PyTypeObject *)cls;
PyObject *res = _PySuper_LookupDescr(tp, self, name);
if (res == NULL) {
SPECIALIZATION_FAIL(LOAD_SUPER_ATTR, SPEC_FAIL_SUPER_ERROR_OR_NOT_FOUND);