]> granicus.if.org Git - python/commitdiff
Replaced a test with an assertion.
authorRaymond Hettinger <python@rcn.com>
Tue, 28 Sep 2004 17:22:12 +0000 (17:22 +0000)
committerRaymond Hettinger <python@rcn.com>
Tue, 28 Sep 2004 17:22:12 +0000 (17:22 +0000)
(Suggested by Michael Hudson.)

Python/compile.c

index 9beb7da7994f348f1f28503528f360964f7e277f..5a57a47fb9ee3609332160f2af7283b88d4df7b0 100644 (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;