Skip to content

Commit 51d76f1

Browse files
committed
future.c: insert a cosmetic space.
pythonrun.c, run_pyc_file(): repair semantic error wrt CO_GENERATOR vs CO_GENERATOR_ALLOWED.
1 parent 5ba5866 commit 51d76f1

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Python/future.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ future_check_features(PyFutureFeatures *ff, node *n, char *filename)
3232
if (strcmp(feature, FUTURE_NESTED_SCOPES) == 0) {
3333
ff->ff_nested_scopes = 1;
3434
} else if (strcmp(feature, FUTURE_GENERATORS) == 0) {
35-
ff->ff_generators= 1;
35+
ff->ff_generators = 1;
3636
} else if (strcmp(feature, "braces") == 0) {
3737
PyErr_SetString(PyExc_SyntaxError,
3838
"not a chance");

Python/pythonrun.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1076,7 +1076,7 @@ run_pyc_file(FILE *fp, char *filename, PyObject *globals, PyObject *locals,
10761076
if (v && flags) {
10771077
if (co->co_flags & CO_NESTED)
10781078
flags->cf_flags |= PyCF_NESTED_SCOPES;
1079-
if (co->co_flags & CO_GENERATOR)
1079+
if (co->co_flags & CO_GENERATOR_ALLOWED)
10801080
flags->cf_flags |= PyCF_GENERATORS;
10811081
#if 0
10821082
fprintf(stderr, "run_pyc_file: nested_scopes: %d\n",

0 commit comments

Comments
 (0)