Skip to content

Commit

Permalink
Removed more hair in support of future-generator stmts.
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-one committed Apr 12, 2002
1 parent 68c7e26 commit 2bbdba3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Include/compile.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ typedef struct {
compiled *by* a code object knows whether to allow yield stmts. In
effect, this passes on the "from __future__ import generators" state
in effect when the code block was compiled. */
#define CO_GENERATOR_ALLOWED 0x1000
#define CO_GENERATOR_ALLOWED 0x1000 /* no longer used in an essential way */
#define CO_FUTURE_DIVISION 0x2000

extern DL_IMPORT(PyTypeObject) PyCode_Type;
Expand Down
4 changes: 2 additions & 2 deletions Include/pythonrun.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
extern "C" {
#endif

#define PyCF_MASK (CO_GENERATOR_ALLOWED | CO_FUTURE_DIVISION)
#define PyCF_MASK_OBSOLETE (CO_NESTED)
#define PyCF_MASK (CO_FUTURE_DIVISION)
#define PyCF_MASK_OBSOLETE (CO_GENERATOR_ALLOWED | CO_NESTED)

typedef struct {
int cf_flags; /* bitmask of CO_xxx flags relevant to future */
Expand Down
2 changes: 1 addition & 1 deletion Python/future.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ future_check_features(PyFutureFeatures *ff, node *n, char *filename)
if (strcmp(feature, FUTURE_NESTED_SCOPES) == 0) {
continue;
} else if (strcmp(feature, FUTURE_GENERATORS) == 0) {
ff->ff_features |= CO_GENERATOR_ALLOWED;
continue;
} else if (strcmp(feature, FUTURE_DIVISION) == 0) {
ff->ff_features |= CO_FUTURE_DIVISION;
} else if (strcmp(feature, "braces") == 0) {
Expand Down

0 comments on commit 2bbdba3

Please sign in to comment.