summaryrefslogtreecommitdiffstats
path: root/Include
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2015-05-09 15:44:30 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2015-05-09 15:44:30 (GMT)
commit8170e8c0d12cb9414f3a3d3ca81a447b4afc5f26 (patch)
treed6353155110b49bf7953fd0d7d3f808512e8feb1 /Include
parentbd60e8dece89440ebdc80a19b2217d5ba2515124 (diff)
downloadcpython-8170e8c0d12cb9414f3a3d3ca81a447b4afc5f26.zip
cpython-8170e8c0d12cb9414f3a3d3ca81a447b4afc5f26.tar.gz
cpython-8170e8c0d12cb9414f3a3d3ca81a447b4afc5f26.tar.bz2
PEP 479: Change StopIteration handling inside generators.
Closes issue #22906.
Diffstat (limited to 'Include')
-rw-r--r--Include/code.h1
-rw-r--r--Include/compile.h1
-rw-r--r--Include/pythonrun.h3
3 files changed, 4 insertions, 1 deletions
diff --git a/Include/code.h b/Include/code.h
index ff2b97e..131de50 100644
--- a/Include/code.h
+++ b/Include/code.h
@@ -62,6 +62,7 @@ typedef struct {
#define CO_FUTURE_UNICODE_LITERALS 0x20000
#define CO_FUTURE_BARRY_AS_BDFL 0x40000
+#define CO_FUTURE_GENERATOR_STOP 0x80000
/* This value is found in the co_cell2arg array when the associated cell
variable does not correspond to an argument. The maximum number of
diff --git a/Include/compile.h b/Include/compile.h
index c6650d7..ecd8dc1 100644
--- a/Include/compile.h
+++ b/Include/compile.h
@@ -27,6 +27,7 @@ typedef struct {
#define FUTURE_PRINT_FUNCTION "print_function"
#define FUTURE_UNICODE_LITERALS "unicode_literals"
#define FUTURE_BARRY_AS_BDFL "barry_as_FLUFL"
+#define FUTURE_GENERATOR_STOP "generator_stop"
struct _mod; /* Declare the existence of this type */
#define PyAST_Compile(mod, s, f, ar) PyAST_CompileEx(mod, s, f, -1, ar)
diff --git a/Include/pythonrun.h b/Include/pythonrun.h
index 1d9b71b..f92148d 100644
--- a/Include/pythonrun.h
+++ b/Include/pythonrun.h
@@ -9,7 +9,8 @@ extern "C" {
#define PyCF_MASK (CO_FUTURE_DIVISION | CO_FUTURE_ABSOLUTE_IMPORT | \
CO_FUTURE_WITH_STATEMENT | CO_FUTURE_PRINT_FUNCTION | \
- CO_FUTURE_UNICODE_LITERALS | CO_FUTURE_BARRY_AS_BDFL)
+ CO_FUTURE_UNICODE_LITERALS | CO_FUTURE_BARRY_AS_BDFL | \
+ CO_FUTURE_GENERATOR_STOP)
#define PyCF_MASK_OBSOLETE (CO_NESTED)
#define PyCF_SOURCE_IS_UTF8 0x0100
#define PyCF_DONT_IMPLY_DEDENT 0x0200