summaryrefslogtreecommitdiff
path: root/Python
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-09-28 17:22:12 +0000
committerRaymond Hettinger <python@rcn.com>2004-09-28 17:22:12 +0000
commitbe9228e5939e3e0475895edfb5915421f681faef (patch)
tree5398670f49d8bc4d19baae67e21763b50b563a1c /Python
parentdf83fc5676cca75bcb66954292954eb80f845a3b (diff)
downloadcpython-be9228e5939e3e0475895edfb5915421f681faef.tar.gz
Replaced a test with an assertion.
(Suggested by Michael Hudson.)
Diffstat (limited to 'Python')
-rw-r--r--Python/compile.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c
index 9beb7da799..5a57a47fb9 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -509,10 +509,8 @@ optimize_code(PyObject *code, PyObject* consts, PyObject *names, PyObject *linen
if (memchr(lineno, 255, tabsiz) != NULL)
goto exitUnchanged;
- if (!PyString_Check(code))
- goto exitUnchanged;
-
/* Avoid situations where jump retargeting could overflow */
+ assert(PyString_Check(code));
codelen = PyString_Size(code);
if (codelen > 32700)
goto exitUnchanged;