From 06cc973d06ff0b6f1126874c142a2a21ad8e497c Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Tue, 28 Sep 2004 17:22:12 +0000 Subject: [PATCH] Replaced a test with an assertion. (Suggested by Michael Hudson.) --- Python/compile.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Python/compile.c b/Python/compile.c index 9beb7da7994..5a57a47fb9e 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;