From: Raymond Hettinger Date: Tue, 28 Sep 2004 17:22:12 +0000 (+0000) Subject: Replaced a test with an assertion. X-Git-Tag: v2.4b1~141 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=06cc973d06ff0b6f1126874c142a2a21ad8e497c;p=thirdparty%2FPython%2Fcpython.git Replaced a test with an assertion. (Suggested by Michael Hudson.) --- diff --git a/Python/compile.c b/Python/compile.c index 9beb7da7994f..5a57a47fb9ee 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;