<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Include/listobject.h, branch v2.7a4</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Include/listobject.h?h=v2.7a4</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Include/listobject.h?h=v2.7a4'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2007-12-19T02:37:44Z</updated>
<entry>
<title>#1629: Renamed Py_Size, Py_Type and Py_Refcnt to Py_SIZE, Py_TYPE and Py_REFCNT. Macros for b/w compatibility are available.</title>
<updated>2007-12-19T02:37:44Z</updated>
<author>
<name>Christian Heimes</name>
<email>christian@cheimes.de</email>
</author>
<published>2007-12-19T02:37:44Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=e93237dfcc4ee4feee62adafb4e7899487ca864b'/>
<id>urn:sha1:e93237dfcc4ee4feee62adafb4e7899487ca864b</id>
<content type='text'>
</content>
</entry>
<entry>
<title>PEP 3123: Provide forward compatibility with Python 3.0, while keeping</title>
<updated>2007-07-21T06:55:02Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2007-07-21T06:55:02Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=6819210b9e4e5719a6f7f9c1725f8fa70a8936f6'/>
<id>urn:sha1:6819210b9e4e5719a6f7f9c1725f8fa70a8936f6</id>
<content type='text'>
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and
PyVarObject_HEAD_INIT.
</content>
</entry>
<entry>
<title>Variation of patch # 1624059 to speed up checking if an object is a subclass</title>
<updated>2007-02-25T19:44:48Z</updated>
<author>
<name>Neal Norwitz</name>
<email>nnorwitz@gmail.com</email>
</author>
<published>2007-02-25T19:44:48Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ee3a1b5244e60566c5d5c8f6a1ea4b381de99f1c'/>
<id>urn:sha1:ee3a1b5244e60566c5d5c8f6a1ea4b381de99f1c</id>
<content type='text'>
of some of the common builtin types.

Use a bit in tp_flags for each common builtin type.  Check the bit
to determine if any instance is a subclass of these common types.
The check avoids a function call and O(n) search of the base classes.
The check is done in the various Py*_Check macros rather than calling
PyType_IsSubtype().

All the bits are set in tp_flags when the type is declared
in the Objects/*object.c files because PyType_Ready() is not called
for all the types.  Should PyType_Ready() be called for all types?
If so and the change is made, the changes to the Objects/*object.c files
can be reverted (remove setting the tp_flags).  Objects/typeobject.c
would also have to be modified to add conditions
for Py*_CheckExact() in addition to each the PyType_IsSubtype check.
</content>
</entry>
<entry>
<title>Merge ssize_t branch.</title>
<updated>2006-02-15T17:27:45Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2006-02-15T17:27:45Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=18e165558b24d29e7e0ca501842b9236589b012a'/>
<id>urn:sha1:18e165558b24d29e7e0ca501842b9236589b012a</id>
<content type='text'>
</content>
</entry>
<entry>
<title>Wrote down the invariants of some common objects whose structure is</title>
<updated>2004-10-28T16:32:00Z</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2004-10-28T16:32:00Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=89a39461bff04b80bb4857790350e1ab30ff2df9'/>
<id>urn:sha1:89a39461bff04b80bb4857790350e1ab30ff2df9</id>
<content type='text'>
exposed in header files.  Fixed a few comments in these headers.

As we might have expected, writing down invariants systematically exposed a
(minor) bug.  In this case, function objects have a writeable func_code
attribute, which could be set to code objects with the wrong number of
free variables.  Calling the resulting function segfaulted the interpreter.
Added a corresponding test.
</content>
</entry>
<entry>
<title>Fix typo in comment</title>
<updated>2004-08-01T22:45:27Z</updated>
<author>
<name>Neal Norwitz</name>
<email>nnorwitz@gmail.com</email>
</author>
<published>2004-08-01T22:45:27Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4ecd8cd046446a6ce0be4098e218f4d17c315d48'/>
<id>urn:sha1:4ecd8cd046446a6ce0be4098e218f4d17c315d48</id>
<content type='text'>
</content>
</entry>
<entry>
<title>* drop the unreasonable list invariant that ob_item should never come back</title>
<updated>2004-07-29T12:40:23Z</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2004-07-29T12:40:23Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=93677f075df9a23c036f4baeb2b9f67c784eadbc'/>
<id>urn:sha1:93677f075df9a23c036f4baeb2b9f67c784eadbc</id>
<content type='text'>
  to NULL during the lifetime of the object.

* listobject.c nevertheless did not conform to the other invariants,
  either; fixed.

* listobject.c now uses list_clear() as the obvious internal way to clear
  a list, instead of abusing list_ass_slice() for that.  It makes it easier
  to enforce the invariant about ob_item == NULL.

* listsort() sets allocated to -1 during sort; any mutation will set it
  to a value &gt;= 0, so it is a safe way to detect mutation.  A negative
  value for allocated does not cause a problem elsewhere currently.
  test_sort.py has a new test for this fix.

* listsort() leak: if items were added to the list during the sort, AND if
  these items had a __del__ that puts still more stuff into the list,
  then this more stuff (and the PyObject** array to hold them) were
  overridden at the end of listsort() and never released.
</content>
</entry>
<entry>
<title>Fix obscure breakage (relative to 2.3) in listsort:  the test for list</title>
<updated>2004-07-29T04:07:15Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2004-07-29T04:07:15Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=51b4ade30615dccaa7f591456528821f4320d5ff'/>
<id>urn:sha1:51b4ade30615dccaa7f591456528821f4320d5ff</id>
<content type='text'>
mutation during list.sort() used to rely on that listobject.c always
NULL'ed ob_item when ob_size fell to 0.  That's no longer true, so the
test for list mutation during a sort is no longer reliable.  Changed the
test to rely instead on that listobject.c now never NULLs-out ob_item
after (if ever) ob_item gets a non-NULL value.  This new assumption is
also documented now, as a required invariant in listobject.h.

The new assumption allowed some real simplification to some of the
hairier code in listsort(), so is a Good Thing on that count.
</content>
</entry>
<entry>
<title>Document what the members of PyListObject are used for, and the crucial</title>
<updated>2004-07-29T03:29:15Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2004-07-29T03:29:15Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=a995a2dd54f904913bfde54317480edf3a3b79c8'/>
<id>urn:sha1:a995a2dd54f904913bfde54317480edf3a3b79c8</id>
<content type='text'>
invariants they must satisfy.
</content>
</entry>
<entry>
<title>Eliminate a big block of duplicate code in PySequence_List() by</title>
<updated>2004-03-11T09:13:12Z</updated>
<author>
<name>Raymond Hettinger</name>
<email>python@rcn.com</email>
</author>
<published>2004-03-11T09:13:12Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8ca92ae54c3c0958bf073fe04d897f8f01e02547'/>
<id>urn:sha1:8ca92ae54c3c0958bf073fe04d897f8f01e02547</id>
<content type='text'>
exposing _PyList_Extend().
</content>
</entry>
</feed>
