8000 Rename variable for clarity · python/cpython@ce6a990 · GitHub
[go: up one dir, main page]

Skip to content

Commit ce6a990

Browse files
committed
Rename variable for clarity
1 parent d5c44f5 commit ce6a990

File tree

5 files changed

+161
-164
lines changed

5 files changed

+161
-164
lines changed

Include/internal/pycore_global_objects_fini_generated.h

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/internal/pycore_global_strings.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,6 @@ struct _Py_global_strings {
4848
STRUCT_FOR_STR(json_decoder, "json.decoder")
4949
STRUCT_FOR_STR(kwdefaults, ".kwdefaults")
5050
STRUCT_FOR_STR(list_err, "list index out of range")
51-
STRUCT_FOR_STR(namespace, ".namespace")
5251
STRUCT_FOR_STR(newline, "\n")
5352
STRUCT_FOR_STR(open_br, "{")
5453
STRUCT_FOR_STR(percent, "%")

Include/internal/pycore_runtime_init_generated.h

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/bytecodes.c

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1169,35 +1169,35 @@ dummy_func(
11691169
}
11701170
}
11711171

1172-
op(_LOAD_NAME_INTRO, (-- class_dict, name)) {
1172+
op(_LOAD_NAME_INTRO, (-- mad_or_class_dict, name)) {
11731173
name = GETITEM(frame->f_code->co_names, oparg);
1174-
class_dict = LOCALS();
1175-
if (class_dict == NULL) {
1174+
mad_or_class_dict = LOCALS();
1175+
if (mad_or_class_dict == NULL) {
11761176
_PyErr_Format(tstate, PyExc_SystemError,
11771177
"no locals when loading %R", name);
11781178
goto error;
11791179
}
11801180
}
11811181

1182-
op(_LOAD_CLASSDICT_OR_GLOBAL_INTRO, (-- class_dict, name)) {
1182+
op(_LOAD_CLASSDICT_OR_GLOBAL_INTRO, (-- mad_or_class_dict, name)) {
11831183
name = GETITEM(frame->f_code->co_names, oparg);
11841184
PyFunctionObject *func = (PyFunctionObject *)frame->f_funcobj;
11851185
if (func == NULL) {
11861186
_PyErr_Format(tstate, PyExc_SystemError,
11871187
"no function defined when loading %R from class dict", name);
11881188
goto error;
11891189
}
1190-
class_dict = func->func_class_dict;
1191-
if (class_dict == NULL) {
1190+
mad_or_class_dict = func->func_class_dict;
1191+
if (mad_or_class_dict == NULL) {
11921192
_PyErr_Format(tstate, PyExc_SystemError,
11931193
"no class dict set when loading %R", name);
11941194
goto error;
11951195
}
11961196
}
11971197

1198-
op(_LOAD_NAME_COMMON, (class_dict, name -- v)) {
1199-
if (PyDict_CheckExact(class_dict)) {
1200-
v = PyDict_GetItemWithError(class_dict, name);
1198+
op(_LOAD_NAME_COMMON, (mad_or_class_dict, name -- v)) {
1199+
if (PyDict_CheckExact(mad_or_class_dict)) {
1200+
v = PyDict_GetItemWithError(mad_or_class_dict, name);
12011201
if (v != NULL) {
12021202
Py_INCREF(v);
12031203
}
@@ -1206,7 +1206,7 @@ dummy_func(
12061206
}
12071207
}
12081208
else {
1209-
v = PyObject_GetItem(class_dict, name);
1209+
v = PyObject_GetItem(mad_or_class_dict, name);
12101210
if (v == NULL) {
12111211
if (!_PyErr_ExceptionMatches(tstate, PyExc_KeyError))
12121212
goto error;

0 commit comments

Comments
 (0)
0