Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
  • Loading branch information
carljm and JelleZijlstra authored Sep 14, 2023
commit bb0a0ddaf8650111dd9551978f83628f0f38e3d3
6 changes: 3 additions & 3 deletions Python/symtable.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,7 +256,7 @@ static int symtable_raise_if_comprehension_block(struct symtable *st, expr_ty);
static void _dump_symtable(PySTEntryObject* ste, PyObject* prefix)
{
const char *blocktype = "";
switch(ste->ste_type) {
switch (ste->ste_type) {
case FunctionBlock: blocktype = "FunctionBlock"; break;
case ClassBlock: blocktype = "ClassBlock"; break;
case ModuleBlock: blocktype = "ModuleBlock"; break;
Expand All @@ -266,7 +266,7 @@ static void _dump_symtable(PySTEntryObject* ste, PyObject* prefix)
case TypeParamBlock: blocktype = "TypeParamBlock"; break;
}
const char *comptype = "";
switch(ste->ste_comprehension) {
switch (ste->ste_comprehension) {
case ListComprehension: comptype = " ListComprehension"; break;
case DictComprehension: comptype = " DictComprehension"; break;
case SetComprehension: comptype = " SetComprehension"; break;
Expand Down Expand Up @@ -307,7 +307,7 @@ static void _dump_symtable(PySTEntryObject* ste, PyObject* prefix)
printf(PyUnicode_AsUTF8(msg));
PyObject *name, *value;
Py_ssize_t pos = 0;
while(PyDict_Next(ste->ste_symbols, &pos, &name, &value)) {
while (PyDict_Next(ste->ste_symbols, &pos, &name, &value)) {
int scope = _PyST_GetScope(ste, name);
long flags = _PyST_GetSymbol(ste, name);
printf("%s %s: ", PyUnicode_AsUTF8(prefix), PyUnicode_AsUTF8(name));
Expand Down