Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
  • Loading branch information
carljm and JelleZijlstra authored Sep 14, 2023
1 parent ce7e6cd commit bb0a0dd
Showing 1 changed file with 3 additions and 3 deletions.
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

0 comments on commit bb0a0dd

Please sign in to comment.