Commit 06cc973d authored by Raymond Hettinger's avatar Raymond Hettinger

Replaced a test with an assertion.

(Suggested by Michael Hudson.)
parent 01ba7992
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment