File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -1025,23 +1025,23 @@ list_pop_impl(PyListObject *self, Py_ssize_t index)
1025
1025
1026
1026
PyObject * * items = self -> ob_item ;
1027
1027
v = items [index ];
1028
- Py_ssize_t pop_after_size = Py_SIZE (self ) - 1 ;
1029
- if (pop_after_size == 0 ) {
1028
+ Py_ssize_t size_after_pop = Py_SIZE (self ) - 1 ;
1029
+ if (size_after_pop == 0 ) {
1030
1030
Py_INCREF (v );
1031
1031
status = _list_clear (self );
1032
1032
}
1033
1033
else {
1034
- if ((pop_after_size - index ) > 0 ) {
1035
- memmove (& items [index ], & items [index + 1 ], (pop_after_size - index ) * sizeof (PyObject * ));
1034
+ if ((size_after_pop - index ) > 0 ) {
1035
+ memmove (& items [index ], & items [index + 1 ], (size_after_pop - index ) * sizeof (PyObject * ));
1036
1036
}
1037
- status = list_resize (self , Py_SIZE ( self ) - 1 );
1037
+ status = list_resize (self , size_after_pop );
1038
1038
}
1039
1039
if (status >= 0 ) {
1040
- return v ; // and v now owns the reference the list had
1040
+ return v ; // and v now owns the reference the list had
1041
1041
}
1042
1042
else {
1043
1043
// list resize failed, need to restore
1044
- memmove (& items [index + 1 ], & items [index ], (pop_after_size - index )* sizeof (PyObject * ));
1044
+ memmove (& items [index + 1 ], & items [index ], (size_after_pop - index )* sizeof (PyObject * ));
1045
1045
items [index ] = v ;
1046
1046
return NULL ;
1047
1047
}
You can’t perform that action at this time.
0 commit comments