Replaced a test with an assertion.

(Suggested by Michael Hudson.)
This commit is contained in:
Raymond Hettinger 2004-09-28 17:22:12 +00:00
parent 01ba799244
commit 06cc973d06
1 changed files with 1 additions and 3 deletions

View File

@ -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;