mirror of
https://github.com/python/cpython.git
synced 2025-07-19 01:05:26 +00:00
Replaced a test with an assertion.
(Suggested by Michael Hudson.)
This commit is contained in:
parent
01ba799244
commit
06cc973d06
1 changed files with 1 additions and 3 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue