]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
use the correct macro to access list size
authorAndrew MacIntyre <andymac@bullseye.apana.org.au>
Fri, 26 Dec 2003 00:09:04 +0000 (00:09 +0000)
committerAndrew MacIntyre <andymac@bullseye.apana.org.au>
Fri, 26 Dec 2003 00:09:04 +0000 (00:09 +0000)
Objects/listobject.c

index 66e4460fe9a8fcd572c4217ae5c96eeb0c129b0e..c630f179e264389f8ec4736caa8abfd97b229ed2 100644 (file)
@@ -2264,7 +2264,7 @@ list_fill(PyListObject *result, PyObject *v)
         * subclasses of list, there being nothing to copy.
         */
        if (PyList_CheckExact(v)) {
-               i = ((PyListObject*)v)->ob_size;
+               i = PyList_GET_SIZE(v);
                if (i == 0)
                        return 0;
                if (i > LISTFILL_OPT_THRESHOLD)