Re: [Python-Dev] [Python-checkins] cpython (2.7): Backport early-out 91259f061cfb to reduce the cost of bb1a2944bcb6

2015-11-12 Thread Raymond Hettinger

> On Nov 11, 2015, at 10:50 PM, Benjamin Peterson  wrote:
> 
>> +if (Py_SIZE(deque) == 0)
>> +return;
>> +
> 
> dequeue is not varsized in Python 2.7, so using Py_SIZE() is incorrect.

Fixed in a2a518b6ded4.

-if (Py_SIZE(deque) == 0)
+if (deque->len == 0)


Raymond
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com


Re: [Python-Dev] [Python-checkins] cpython (2.7): Backport early-out 91259f061cfb to reduce the cost of bb1a2944bcb6

2015-11-12 Thread Benjamin Peterson
There's two instances in that file.

On Thu, Nov 12, 2015, at 07:20, Raymond Hettinger wrote:
> 
> > On Nov 11, 2015, at 10:50 PM, Benjamin Peterson  wrote:
> > 
> >> +if (Py_SIZE(deque) == 0)
> >> +return;
> >> +
> > 
> > dequeue is not varsized in Python 2.7, so using Py_SIZE() is incorrect.
> 
> Fixed in a2a518b6ded4.
> 
> -if (Py_SIZE(deque) == 0)
> +if (deque->len == 0)
> 
> 
> Raymond
___
Python-Dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com