Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(147)

#15469: Correct __sizeof__ support for deque

Can't Edit
Can't Publish+Mail
Start Review
Created:
9 months, 4 weeks ago by storchaka
Modified:
9 months, 3 weeks ago
Reviewers:
martin
CC:
rhettinger, meadori, devnull_psf.upfronthosting.co.za, storchaka
Visibility:
Public.

Patch Set 1 #

Total comments: 1

Patch Set 2 #

Patch Set 3 #

Patch Set 4 #

Patch Set 5 #

Patch Set 6 #

Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Lib/test/test_deque.py View 1 2 3 4 5 2 chunks +16 lines, -0 lines 0 comments Download
Modules/_collectionsmodule.c View 1 2 3 4 5 2 chunks +20 lines, -1 line 0 comments Download

Messages

Total messages: 1
loewis
9 months, 3 weeks ago #1
http://bugs.python.org/review/15469/diff/5535/Modules/_collectionsmodule.c
File Modules/_collectionsmodule.c (right):

http://bugs.python.org/review/15469/diff/5535/Modules/_collectionsmodule.c#ne...
Modules/_collectionsmodule.c:942: for (b = deque->leftblock; b != NULL; b =
b->rightlink) {
I think you can compute the number of blocks by rounding up deque->len/BLOCKLEN;
no need to iterate over the deque.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7