mirror of
https://github.com/python/cpython.git
synced 2025-11-12 15:09:14 +00:00
use the correct macro to access list size
This commit is contained in:
parent
f72af655c5
commit
694e3a4a9d
1 changed files with 1 additions and 1 deletions
|
|
@ -2264,7 +2264,7 @@ list_fill(PyListObject *result, PyObject *v)
|
||||||
* subclasses of list, there being nothing to copy.
|
* subclasses of list, there being nothing to copy.
|
||||||
*/
|
*/
|
||||||
if (PyList_CheckExact(v)) {
|
if (PyList_CheckExact(v)) {
|
||||||
i = ((PyListObject*)v)->ob_size;
|
i = PyList_GET_SIZE(v);
|
||||||
if (i == 0)
|
if (i == 0)
|
||||||
return 0;
|
return 0;
|
||||||
if (i > LISTFILL_OPT_THRESHOLD)
|
if (i > LISTFILL_OPT_THRESHOLD)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue