summaryrefslogtreecommitdiff
path: root/Python/import.c
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-05-25 13:13:44 +0000
committerBenjamin Peterson <benjamin@python.org>2009-05-25 13:13:44 +0000
commit1880d8b8231d0085700d5d3c03ee9b16c619720d (patch)
tree5ee56e8c0e04567dd7fb793a5c510007f623e3f3 /Python/import.c
parent179bf213ea0432f2219c9b72ff4c4e18062fb588 (diff)
downloadcpython-git-1880d8b8231d0085700d5d3c03ee9b16c619720d.tar.gz
add a SETUP_WITH opcode
It speeds up the with statement and correctly looks up the special methods involved.
Diffstat (limited to 'Python/import.c')
-rw-r--r--Python/import.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/Python/import.c b/Python/import.c
index 5e42e5c9f3..88aced06d1 100644
--- a/Python/import.c
+++ b/Python/import.c
@@ -74,9 +74,10 @@ typedef unsigned short mode_t;
Python 2.7a0: 62171 (optimize list comprehensions/change LIST_APPEND)
Python 2.7a0: 62181 (optimize conditional branches:
introduce POP_JUMP_IF_FALSE and POP_JUMP_IF_TRUE)
+ Python 2.7a0 62191 (introduce SETUP_WITH)
.
*/
-#define MAGIC (62181 | ((long)'\r'<<16) | ((long)'\n'<<24))
+#define MAGIC (62191 | ((long)'\r'<<16) | ((long)'\n'<<24))
/* Magic word as global; note that _PyImport_Init() can change the
value of this global to accommodate for alterations of how the