]> granicus.if.org Git - python/commitdiff
Use macro version of GET_SIZE to avoid Coverity warning (#150) about a possible error.
authorNeal Norwitz <nnorwitz@gmail.com>
Sat, 9 Jun 2007 04:48:22 +0000 (04:48 +0000)
committerNeal Norwitz <nnorwitz@gmail.com>
Sat, 9 Jun 2007 04:48:22 +0000 (04:48 +0000)
Python/peephole.c

index 71113316bbe7ed544487f07cd0339cf41f79ae2e..286ac29b39f1c9cec22fd15e5e99abcec159a1c3 100644 (file)
@@ -308,7 +308,7 @@ PyCode_Optimize(PyObject *code, PyObject* consts, PyObject *names,
 
        /* Avoid situations where jump retargeting could overflow */
        assert(PyString_Check(code));
-       codelen = PyString_Size(code);
+       codelen = PyString_GET_SIZE(code);
        if (codelen > 32700)
                goto exitUnchanged;