<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Objects/object.c, branch v2.2.1</title>
<subtitle>Python interpreter</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Objects/object.c?h=v2.2.1</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Objects/object.c?h=v2.2.1'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2002-03-05T15:41:40Z</updated>
<entry>
<title>Backport the bits of Guido's fix for</title>
<updated>2002-03-05T15:41:40Z</updated>
<author>
<name>Michael W. Hudson</name>
<email>mwh@python.net</email>
</author>
<published>2002-03-05T15:41:40Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c4562a89ea7ad46d6b7ab57481e4cf214e7a7b47'/>
<id>urn:sha1:c4562a89ea7ad46d6b7ab57481e4cf214e7a7b47</id>
<content type='text'>
SF patch 514641 (Naofumi Honda) - Negative ob_size of LongObjects

that Tim didn't later back out.
</content>
</entry>
<entry>
<title>backport tim_one's checkin of</title>
<updated>2002-03-05T14:23:56Z</updated>
<author>
<name>Michael W. Hudson</name>
<email>mwh@python.net</email>
</author>
<published>2002-03-05T14:23:56Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=fc7af7705ca0b381a9abd0535d02bd44e3f07ced'/>
<id>urn:sha1:fc7af7705ca0b381a9abd0535d02bd44e3f07ced</id>
<content type='text'>
    revision 2.164 of object.c

Whether platform malloc(0) returns NULL has nothing to do with whether
platform realloc(p, 0) returns NULL, so MALLOC_ZERO_RETURNS_NULL can
be correctly undefined yet realloc(p, 0) can return NULL anyway.

Prevent realloc(p, 0) doing free(p) and returning NULL via a different
hack.  Would probably be better to get rid of MALLOC_ZERO_RETURNS_NULL
entirely.

Bugfix candidate.
</content>
</entry>
<entry>
<title>PyObject_Generic{Get,Set}Attr(): ensure that the attribute name is a</title>
<updated>2001-12-04T15:54:53Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-12-04T15:54:53Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ebca9fc1ba23e58d734b9ab422da6a64fa4d72e2'/>
<id>urn:sha1:ebca9fc1ba23e58d734b9ab422da6a64fa4d72e2</id>
<content type='text'>
string object (or a Unicode that's trivially converted to ASCII).

PyObject_GetAttr(): add an 'else' to the Unicode test like
PyObject_SetAttr() already has.
</content>
</entry>
<entry>
<title>Rehabilitated the fast-path richcmp code, and sped it up.  It wasn't</title>
<updated>2001-11-04T07:29:31Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-11-04T07:29:31Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=67754e993ea681dcdd6d13e396411524922ba89a'/>
<id>urn:sha1:67754e993ea681dcdd6d13e396411524922ba89a</id>
<content type='text'>
helping for types that defined tp_richcmp but not tp_compare, although
that's when it's most valuable, and strings moved into that category
since the fast path was first introduced.  Now it helps for same-type
non-Instance objects that define rich or 3-way compares.

For all the edits here, the rest just amounts to moving the fast path from
do_richcmp into PyObject_RichCompare, saving a layer of function call
(measurable on my box!).  This loses when NESTING_LIMIT is exceeded, but I
don't care about that (fast-paths are for normal cases, not pathologies).

Also added a tasteful &lt;wink&gt; label to get out of PyObject_RichCompare, as
the if/else nesting in this routine was getting incomprehensible.
</content>
</entry>
<entry>
<title>No code change -- just trying to document the return conditions for all</title>
<updated>2001-11-04T05:57:16Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-11-04T05:57:16Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c99213f99369020c06bb75721fd41e2681445834'/>
<id>urn:sha1:c99213f99369020c06bb75721fd41e2681445834</id>
<content type='text'>
the internal comparison routines.
</content>
</entry>
<entry>
<title>cleanup indentation</title>
<updated>2001-10-22T16:30:36Z</updated>
<author>
<name>Jeremy Hylton</name>
<email>jeremy@alum.mit.edu</email>
</author>
<published>2001-10-22T16:30:36Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=39a362d9f4ed436151d32faf9d5c963c33c5d855'/>
<id>urn:sha1:39a362d9f4ed436151d32faf9d5c963c33c5d855</id>
<content type='text'>
</content>
</entry>
<entry>
<title>SF patch #470578: Fixes to synchronize unicode() and str()</title>
<updated>2001-10-19T02:01:31Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2001-10-19T02:01:31Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b8c65bc27ffc61c659180c351d3cc283abd1be45'/>
<id>urn:sha1:b8c65bc27ffc61c659180c351d3cc283abd1be45</id>
<content type='text'>
    This patch implements what we have discussed on python-dev late in
    September: str(obj) and unicode(obj) should behave similar, while
    the old behaviour is retained for unicode(obj, encoding, errors).

    The patch also adds a new feature with which objects can provide
    unicode(obj) with input data: the __unicode__ method. Currently no
    new tp_unicode slot is implemented; this is left as option for the
    future.

    Note that PyUnicode_FromEncodedObject() no longer accepts Unicode
    objects as input. The API name already suggests that Unicode
    objects do not belong in the list of acceptable objects and the
    functionality was only needed because
    PyUnicode_FromEncodedObject() was being used directly by
    unicode(). The latter was changed in the discussed way:

    * unicode(obj) calls PyObject_Unicode()
    * unicode(obj, encoding, errors) calls PyUnicode_FromEncodedObject()

    One thing left open to discussion is whether to leave the
    PyUnicode_FromObject() API as a thin API extension on top of
    PyUnicode_FromEncodedObject() or to turn it into a (macro) alias
    for PyObject_Unicode() and deprecate it. Doing so would have some
    surprising consequences though, e.g.  u"abc" + 123 would turn out
    as u"abc123"...

[Marc-Andre didn't have time to check this in before the deadline.  I
hope this is OK, Marc-Andre!  You can still make changes and commit
them on the trunk after the branch has been made, but then please mail
Barry a context diff if you want the change to be merged into the
2.2b1 release branch.  GvR]
</content>
</entry>
<entry>
<title>SF bug [#468061] __str__ ignored in str subclass.</title>
<updated>2001-10-16T20:18:24Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-10-16T20:18:24Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=c993315b188b08b6d78248522f6d0ed31d52f939'/>
<id>urn:sha1:c993315b188b08b6d78248522f6d0ed31d52f939</id>
<content type='text'>
object.c, PyObject_Str:  Don't try to optimize anything except exact
string objects here; in particular, let str subclasses go thru tp_str,
same as non-str objects.  This allows overrides of tp_str to take
effect.

stringobject.c:
+ string_print (str's tp_print):  If the argument isn't an exact string
  object, get one from PyObject_Str.

+ string_str (str's tp_str):  Make a genuine-string copy of the object if
  it's of a proper str subclass type.  str() applied to a str subclass
  that doesn't override __str__ ends up here.

test_descr.py:  New str_of_str_subclass() test.
</content>
</entry>
<entry>
<title>Guido suggests, and I agree, to insist that SIZEOF_VOID_P be a power of 2.</title>
<updated>2001-10-07T03:54:51Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-10-07T03:54:51Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f2a67daca2206bab783abba99d428e5eaf36a8f7'/>
<id>urn:sha1:f2a67daca2206bab783abba99d428e5eaf36a8f7</id>
<content type='text'>
This simplifies the rounding in _PyObject_VAR_SIZE, allows to restore the
pre-rounding calling sequence, and allows some nice little simplifications
in its callers.  I'm still making it return a size_t, though.
</content>
</entry>
<entry>
<title>_PyObject_VAR_SIZE:  always round up to a multiple-of-pointer-size value.</title>
<updated>2001-10-06T21:27:34Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2001-10-06T21:27:34Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=6d483d3477c37d7dfe3113ef6fd02ba02c78fde6'/>
<id>urn:sha1:6d483d3477c37d7dfe3113ef6fd02ba02c78fde6</id>
<content type='text'>
As Guido suggested, this makes the new subclassing code substantially
simpler.  But the mechanics of doing it w/ C macro semantics are a mess,
and _PyObject_VAR_SIZE has a new calling sequence now.

Question:  The PyObject_NEW_VAR macro appears to be part of the public API.
Regardless of what it expands to, the notion that it has to round up the
memory it allocates is new, and extensions containing the old
PyObject_NEW_VAR macro expansion (which was embedded in the
PyObject_NEW_VAR expansion) won't do this rounding.  But the rounding
isn't actually *needed* except for new-style instances with dict pointers
after a variable-length blob of embedded data.  So my guess is that we do
not need to bump the API version for this (as the rounding isn't needed
for anything an extension can do unless it's recompiled anyway).  What's
your guess?
</content>
</entry>
</feed>
