<feed xmlns='http://www.w3.org/2005/Atom'>
<title>python.git/Python/mystrtoul.c, branch v2.5.2</title>
<subtitle>Unnamed repository; edit this file 'description' to name the repository.</subtitle>
<id>http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Python/mystrtoul.c?h=v2.5.2</id>
<link rel='self' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/atom/Python/mystrtoul.c?h=v2.5.2'/>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/'/>
<updated>2006-10-04T11:44:06Z</updated>
<entry>
<title>Forward-port of r52136: a review of overflow-detecting code.</title>
<updated>2006-10-04T11:44:06Z</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2006-10-04T11:44:06Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=4b63c21d6faebc406260733c16b826e3e01b0d89'/>
<id>urn:sha1:4b63c21d6faebc406260733c16b826e3e01b0d89</id>
<content type='text'>
* unified the way intobject, longobject and mystrtoul handle
  values around -sys.maxint-1.

* in general, trying to entierely avoid overflows in any computation
  involving signed ints or longs is extremely involved.  Fixed a few
  simple cases where a compiler might be too clever (but that's all
  guesswork).

* more overflow checks against bad data in marshal.c.

* 2.5 specific: fixed a number of places that were still confusing int
  and Py_ssize_t.  Some of them could potentially have caused
  "real-world" breakage.

* list.pop(x): fixing overflow issues on x was messy.  I just reverted
  to PyArg_ParseTuple("n"), which does the right thing.  (An obscure
  test was trying to give a Decimal to list.pop()... doesn't make
  sense any more IMHO)

* trying to write a few tests...
</content>
</entry>
<entry>
<title>Bug #1521947:  possible bug in mystrtol.c with recent gcc.</title>
<updated>2006-07-27T01:14:53Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2006-07-27T01:14:53Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=bc24eee333126a313bfe42381050a49ecbbc8bbe'/>
<id>urn:sha1:bc24eee333126a313bfe42381050a49ecbbc8bbe</id>
<content type='text'>
In general, C doesn't define anything about what happens when
an operation on a signed integral type overflows, and PyOS_strtol()
did several formally undefined things of that nature on signed
longs.  Some version of gcc apparently tries to exploit that now,
and PyOS_strtol() could fail to detect overflow then.

Tried to repair all that, although it seems at least as likely to me
that we'll get screwed by bad platform definitions for LONG_MIN
and/or LONG_MAX now.  For that reason, I don't recommend backporting
this.

Note that I have no box on which this makes a lick of difference --
can't really test it, except to note that it didn't break anything
on my boxes.

Silent change:  PyOS_strtol() used to return the hard-coded 0x7fffffff
in case of overflow.  Now it returns LONG_MAX.  They're the same only on
32-bit boxes (although C doesn't guarantee that either ...).
</content>
</entry>
<entry>
<title>On 64 bit systems, int literals that use less than 64 bits are now ints</title>
<updated>2006-07-09T22:14:42Z</updated>
<author>
<name>Neal Norwitz</name>
<email>nnorwitz@gmail.com</email>
</author>
<published>2006-07-09T22:14:42Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=28746aba9bf636d03eb1c1c5f4550c6f2dbf5300'/>
<id>urn:sha1:28746aba9bf636d03eb1c1c5f4550c6f2dbf5300</id>
<content type='text'>
rather than longs.  This also fixes the test for eval(-sys.maxint - 1).
</content>
</entry>
<entry>
<title>Patch #1495999: Part two of Windows CE changes.</title>
<updated>2006-06-10T12:23:46Z</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2006-06-10T12:23:46Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=0e8bd7e1ccf7f47bc0bb920af899c77669016d3d'/>
<id>urn:sha1:0e8bd7e1ccf7f47bc0bb920af899c77669016d3d</id>
<content type='text'>
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
</content>
</entry>
<entry>
<title>A new table to help string-&gt;integer conversion was added yesterday to</title>
<updated>2006-05-25T17:34:03Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2006-05-25T17:34:03Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=da53afa1b09218c0fb7ce8803cd783a43ee9d319'/>
<id>urn:sha1:da53afa1b09218c0fb7ce8803cd783a43ee9d319</id>
<content type='text'>
both mystrtoul.c and longobject.c.  Share the table instead.  Also
cut its size by 64 entries (they had been used for an inscrutable
trick originally, but the code no longer tries to use that trick).
</content>
</entry>
<entry>
<title>Bug #1334662 / patch #1335972:  int(string, base) wrong answers.</title>
<updated>2006-05-23T18:45:30Z</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2006-05-23T18:45:30Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=b713ec2531b61568dd2e768455e37e160b578d76'/>
<id>urn:sha1:b713ec2531b61568dd2e768455e37e160b578d76</id>
<content type='text'>
In rare cases of strings specifying true values near sys.maxint,
and oddball bases (not decimal or a power of 2), int(string, base)
could deliver insane answers.  This repairs all such problems, and
also speeds string-&gt;int significantly.  On my box, here are %
speedups for decimal strings of various lengths:

length speedup
------ -------
 1       12.4%
 2       15.7%
 3       20.6%
 4       28.1%
 5       33.2%
 6       37.5%
 7       41.9%
 8       46.3%
 9       51.2%
10       19.5%
11       19.9%
12       23.9%
13       23.7%
14       23.3%
15       24.9%
16       25.3%
17       28.3%
18       27.9%
19       35.7%

Note that the difference between 9 and 10 is the difference between
short and long Python ints on a 32-bit box.  The patch doesn't
actually do anything to speed conversion to long:  the speedup is
due to detecting "unsigned long" overflow more quickly.

This is a bugfix candidate, but it's a non-trivial patch and it
would be painful to separate the "bug fix" from the "speed up" parts.
</content>
</entry>
<entry>
<title>Getting rid of support for the ancient Apple MPW compiler.</title>
<updated>2003-11-19T15:24:47Z</updated>
<author>
<name>Jack Jansen</name>
<email>jack.jansen@cwi.nl</email>
</author>
<published>2003-11-19T15:24:47Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=fb2765666f23434061e5def1aa8392797edf1f43'/>
<id>urn:sha1:fb2765666f23434061e5def1aa8392797edf1f43</id>
<content type='text'>
</content>
</entry>
<entry>
<title>REMOVED all CWI, CNRI and BeOpen copyright markings.</title>
<updated>2000-09-01T23:29:29Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2000-09-01T23:29:29Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=8586991099e4ace18ee94163a96b8ea1bed77ebe'/>
<id>urn:sha1:8586991099e4ace18ee94163a96b8ea1bed77ebe</id>
<content type='text'>
This should match the situation in the 1.6b1 tree.
</content>
</entry>
<entry>
<title>Mass ANSIfication of function definitions. Doesn't cover all 'extern'</title>
<updated>2000-07-22T18:47:25Z</updated>
<author>
<name>Thomas Wouters</name>
<email>thomas@python.org</email>
</author>
<published>2000-07-22T18:47:25Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=f70ef4f8606f99744252a804229d53a4d97601c1'/>
<id>urn:sha1:f70ef4f8606f99744252a804229d53a4d97601c1</id>
<content type='text'>
declarations yet, those come later.
</content>
</entry>
<entry>
<title>Change copyright notice - 2nd try.</title>
<updated>2000-06-30T23:58:06Z</updated>
<author>
<name>Guido van Rossum</name>
<email>guido@python.org</email>
</author>
<published>2000-06-30T23:58:06Z</published>
<link rel='alternate' type='text/html' href='http://dangofactory.net/cgit/cgit.cgi/Server/python.git/commit/?id=ffcc3813d82e6b96db79f518f4e67b940a13ce64'/>
<id>urn:sha1:ffcc3813d82e6b96db79f518f4e67b940a13ce64</id>
<content type='text'>
</content>
</entry>
</feed>
