<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Modules/collectionsmodule.c, branch v2.4b2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Modules/collectionsmodule.c?h=v2.4b2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Modules/collectionsmodule.c?h=v2.4b2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2004-11-02T02:11:35Z</updated>
<entry>
<title>Bump-up block size.</title>
<updated>2004-11-02T02:11:35Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-11-02T02:11:35Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=7d112df94f97cec372bdb7f15eb265ded908da50'/>
<id>urn:sha1:7d112df94f97cec372bdb7f15eb265ded908da50</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Simplify delitem() code by calling rotate() directly instead of using</title>
<updated>2004-10-09T16:02:18Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-10-09T16:02:18Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=dcb9d9467c93f9a97067a4c01d2838452551e4b2'/>
<id>urn:sha1:dcb9d9467c93f9a97067a4c01d2838452551e4b2</id>
<content type='text'>
arguments passed through tuples.
</content>
</entry>
<entry>
<title>Armin's patch to prevent overflows.</title>
<updated>2004-10-06T17:51:54Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-10-06T17:51:54Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c5fa992069b0e9588805573f0f4a685980bbcc05'/>
<id>urn:sha1:c5fa992069b0e9588805573f0f4a685980bbcc05</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Upon insertion, if memory runs out, the deque was left in a corrupted state.</title>
<updated>2004-10-02T13:59:34Z</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2004-10-02T13:59:34Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=974d757af15c22049a2aaa8cecf1456cd79d6397'/>
<id>urn:sha1:974d757af15c22049a2aaa8cecf1456cd79d6397</id>
<content type='text'>
deque_item(): a performance bug: the linked list of blocks was followed
from the left in most cases, because the test (i &lt; (deque-&gt;len &gt;&gt; 1)) was
after "i %= BLOCKLEN".

deque_clear(): replaced a call to deque_len() with deque-&gt;len; not sure what
this call was here for, nor if all compilers under the sun would inline it.

deque_traverse(): I belive that it could be called by the GC when the deque
has leftblock==rightblock==NULL, because it is tracked before the first block
is allocated (though closely before).  Still, a C extension module subclassing
deque could provide its own tp_alloc that could trigger a GC collection after
the PyObject_GC_Track()...

deque_richcompare(): rewrote to cleanly check for end-of-iterations instead of
relying on deque.__iter__().next() to succeed exactly len(deque) times -- an
assumption which can break if deques are subclassed.  Added a test.

I wonder if the length should be explicitely bounded to INT_MAX, with
OverflowErrors, as in listobject.c.  On 64-bit machines, adding more than
INT_MAX in the deque will result in trouble.  (Note to anyone/me fixing
this: carefully check for overflows if len is close to INT_MAX in the
following functions: deque_rotate(), deque_item(), deque_ass_item())
</content>
</entry>
<entry>
<title>* Bulletproof the method for detecting mutations during iteration.</title>
<updated>2004-10-02T00:43:13Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-10-02T00:43:13Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=d1b3d88bf33e6c854807a5eca644a6c1c12ec5f4'/>
<id>urn:sha1:d1b3d88bf33e6c854807a5eca644a6c1c12ec5f4</id>
<content type='text'>
  The previous approach was too easily fooled (a rotate() sufficed).

* Use it-&gt;counter to determine when iteration is complete.  The
  previous approach was too complex.

* Strengthen an assertion and add a comment here or there.
</content>
</entry>
<entry>
<title>Restore the block length and add a comment.</title>
<updated>2004-10-01T15:25:53Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-10-01T15:25:53Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=77e8bf1ca48f15780c7724910236d8ebb1da3c33'/>
<id>urn:sha1:77e8bf1ca48f15780c7724910236d8ebb1da3c33</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Clarify the relationship between indices.</title>
<updated>2004-10-01T15:14:39Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-10-01T15:14:39Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4ca4c7c8ccb681067d18fad063a3423fafc4d6f3'/>
<id>urn:sha1:4ca4c7c8ccb681067d18fad063a3423fafc4d6f3</id>
<content type='text'>
</content>
</entry>
<entry>
<title>* Elaborate on the invariant comments and make them more precise.</title>
<updated>2004-10-01T06:24:12Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-10-01T06:24:12Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=61f05fb96d17e60272bea6557125d8dc10c48a3f'/>
<id>urn:sha1:61f05fb96d17e60272bea6557125d8dc10c48a3f</id>
<content type='text'>
* Change the centering by one to make it possible to test the module
  with BLOCKLEN's as low as two.  Testing small blocks makes end-point
  errors surface more readily.
</content>
</entry>
<entry>
<title>deque_traverse():  If the deque had one block, and its rightindex was</title>
<updated>2004-10-01T02:01:04Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2004-10-01T02:01:04Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=10c7e86454db59ece9d5ed028dd9d104ac766bdf'/>
<id>urn:sha1:10c7e86454db59ece9d5ed028dd9d104ac766bdf</id>
<content type='text'>
BLOCKLEN-1, this assert-failed in a debug build, or went wild with a
NULL pointer in a release build.  Reported on c.l.py by Stefan Behnel.
</content>
</entry>
<entry>
<title>Typos in new comments.</title>
<updated>2004-10-01T01:35:54Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2004-10-01T01:35:54Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=d6e0032768effca9e33cb6db9ce47e785541590f'/>
<id>urn:sha1:d6e0032768effca9e33cb6db9ce47e785541590f</id>
<content type='text'>
</content>
</entry>
</feed>
