diff options
author | Raymond Hettinger <python@rcn.com> | 2004-09-28 17:22:12 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2004-09-28 17:22:12 (GMT) |
commit | 06cc973d06ff0b6f1126874c142a2a21ad8e497c (patch) | |
tree | 59bc8c677d709d4b300e041866fb253ee375a1ea /Python | |
parent | 01ba799244388d6c5c0ada3d4d46a6218b273291 (diff) | |
download | cpython-06cc973d06ff0b6f1126874c142a2a21ad8e497c.zip cpython-06cc973d06ff0b6f1126874c142a2a21ad8e497c.tar.gz cpython-06cc973d06ff0b6f1126874c142a2a21ad8e497c.tar.bz2 |
Replaced a test with an assertion.
(Suggested by Michael Hudson.)
Diffstat (limited to 'Python')
-rw-r--r-- | Python/compile.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/Python/compile.c b/Python/compile.c index 9beb7da..5a57a47 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; |