mirror of
https://github.com/python/cpython.git
synced 2025-09-22 16:33:26 +00:00
future.c: insert a cosmetic space.
pythonrun.c, run_pyc_file(): repair semantic error wrt CO_GENERATOR vs CO_GENERATOR_ALLOWED.
This commit is contained in:
parent
5ba5866281
commit
51d76f1f75
2 changed files with 2 additions and 2 deletions
|
@ -32,7 +32,7 @@ future_check_features(PyFutureFeatures *ff, node *n, char *filename)
|
||||||
if (strcmp(feature, FUTURE_NESTED_SCOPES) == 0) {
|
if (strcmp(feature, FUTURE_NESTED_SCOPES) == 0) {
|
||||||
ff->ff_nested_scopes = 1;
|
ff->ff_nested_scopes = 1;
|
||||||
} else if (strcmp(feature, FUTURE_GENERATORS) == 0) {
|
} else if (strcmp(feature, FUTURE_GENERATORS) == 0) {
|
||||||
ff->ff_generators= 1;
|
ff->ff_generators = 1;
|
||||||
} else if (strcmp(feature, "braces") == 0) {
|
} else if (strcmp(feature, "braces") == 0) {
|
||||||
PyErr_SetString(PyExc_SyntaxError,
|
PyErr_SetString(PyExc_SyntaxError,
|
||||||
"not a chance");
|
"not a chance");
|
||||||
|
|
|
@ -1076,7 +1076,7 @@ run_pyc_file(FILE *fp, char *filename, PyObject *globals, PyObject *locals,
|
||||||
if (v && flags) {
|
if (v && flags) {
|
||||||
if (co->co_flags & CO_NESTED)
|
if (co->co_flags & CO_NESTED)
|
||||||
flags->cf_flags |= PyCF_NESTED_SCOPES;
|
flags->cf_flags |= PyCF_NESTED_SCOPES;
|
||||||
if (co->co_flags & CO_GENERATOR)
|
if (co->co_flags & CO_GENERATOR_ALLOWED)
|
||||||
flags->cf_flags |= PyCF_GENERATORS;
|
flags->cf_flags |= PyCF_GENERATORS;
|
||||||
#if 0
|
#if 0
|
||||||
fprintf(stderr, "run_pyc_file: nested_scopes: %d\n",
|
fprintf(stderr, "run_pyc_file: nested_scopes: %d\n",
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue