<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/cpython.git/Python/mystrtoul.c, branch v2.7</title>
<subtitle>
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/'/>
<entry>
<title>Untabify C files. Will watch buildbots.</title>
<updated>2010-05-09T14:46:46+00:00</updated>
<author>
<name>Antoine Pitrou</name>
<email>solipsis@pitrou.net</email>
</author>
<published>2010-05-09T14:46:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=7674841ef015b47767c7939c16a8ea1fe92ae340'/>
<id>7674841ef015b47767c7939c16a8ea1fe92ae340</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Revert r61969 which added casts to Py_CHARMASK to avoid compiler warnings.</title>
<updated>2008-03-28T04:58:51+00:00</updated>
<author>
<name>Neal Norwitz</name>
<email>nnorwitz@gmail.com</email>
</author>
<published>2008-03-28T04:58:51+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=bcbd562ae06d5ddc3c4b96e58d3b2afc67dfa4cf'/>
<id>bcbd562ae06d5ddc3c4b96e58d3b2afc67dfa4cf</id>
<content type='text'>
Rather than sprinkle casts throughout the code, change Py_CHARMASK to
always cast it's result to an unsigned char.  This should ensure we
do the right thing when accessing an array with the result.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Rather than sprinkle casts throughout the code, change Py_CHARMASK to
always cast it's result to an unsigned char.  This should ensure we
do the right thing when accessing an array with the result.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix warnings about using char as an array subscript.  This is not portable</title>
<updated>2008-03-27T04:40:50+00:00</updated>
<author>
<name>Neal Norwitz</name>
<email>nnorwitz@gmail.com</email>
</author>
<published>2008-03-27T04:40:50+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=23afb7580f5fbfc450ad24ae71058f18d782f5c0'/>
<id>23afb7580f5fbfc450ad24ae71058f18d782f5c0</id>
<content type='text'>
since char is signed on some platforms and unsigned on others.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
since char is signed on some platforms and unsigned on others.
</pre>
</div>
</content>
</entry>
<entry>
<title>Finished backporting PEP 3127, Integer Literal Support and Syntax.</title>
<updated>2008-03-17T17:32:20+00:00</updated>
<author>
<name>Eric Smith</name>
<email>eric@trueblade.com</email>
</author>
<published>2008-03-17T17:32:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=d8c5e88727a187b2c0389411da3ca8aea61b4a28'/>
<id>d8c5e88727a187b2c0389411da3ca8aea61b4a28</id>
<content type='text'>
Added 0b and 0o literals to tokenizer.
Modified PyOS_strtoul to support 0b and 0o inputs.
Modified PyLong_FromString to support guessing 0b and 0o inputs.
Renamed test_hexoct.py to test_int_literal.py and added binary tests.
Added upper and lower case 0b, 0O, and 0X tests to test_int_literal.py
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added 0b and 0o literals to tokenizer.
Modified PyOS_strtoul to support 0b and 0o inputs.
Modified PyLong_FromString to support guessing 0b and 0o inputs.
Renamed test_hexoct.py to test_int_literal.py and added binary tests.
Added upper and lower case 0b, 0O, and 0X tests to test_int_literal.py
</pre>
</div>
</content>
</entry>
<entry>
<title>Removed duplicate Py_CHARMASK define.  It's already defined in Python.h.</title>
<updated>2008-02-23T16:05:26+00:00</updated>
<author>
<name>Eric Smith</name>
<email>eric@trueblade.com</email>
</author>
<published>2008-02-23T16:05:26+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=cb7ad51821b85a795f1c60f921a740b4fa7adffa'/>
<id>cb7ad51821b85a795f1c60f921a740b4fa7adffa</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix #1679: "0x" was taken as a valid integer literal.</title>
<updated>2008-01-19T19:27:05+00:00</updated>
<author>
<name>Georg Brandl</name>
<email>georg@python.org</email>
</author>
<published>2008-01-19T19:27:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=dcebac6386788051ed917ad6c18a716d39648f15'/>
<id>dcebac6386788051ed917ad6c18a716d39648f15</id>
<content type='text'>
Fixes the tokenizer, tokenize.py and int() to reject this.
Patches by Malte Helmert.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fixes the tokenizer, tokenize.py and int() to reject this.
Patches by Malte Helmert.
</pre>
</div>
</content>
</entry>
<entry>
<title>Forward-port of r52136,52138: a review of overflow-detecting code.</title>
<updated>2006-10-04T12:17:45+00:00</updated>
<author>
<name>Armin Rigo</name>
<email>arigo@tunes.org</email>
</author>
<published>2006-10-04T12:17:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=b7e7c5c59135a809f20ff3fa43693212a482f77c'/>
<id>b7e7c5c59135a809f20ff3fa43693212a482f77c</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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
* 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...
</pre>
</div>
</content>
</entry>
<entry>
<title>Bug #1521947:  possible bug in mystrtol.c with recent gcc.</title>
<updated>2006-07-27T01:14:53+00:00</updated>
<author>
<name>Tim Peters</name>
<email>tim.peters@gmail.com</email>
</author>
<published>2006-07-27T01:14:53+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=8b8960ef1334575a787b661fdaa7ff98a4bcfe12'/>
<id>8b8960ef1334575a787b661fdaa7ff98a4bcfe12</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>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
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 ...).
</pre>
</div>
</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:42+00:00</updated>
<author>
<name>Neal Norwitz</name>
<email>nnorwitz@gmail.com</email>
</author>
<published>2006-07-09T22:14:42+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=5c998a3eca793caa9cafa3fef4d1b5d07b089157'/>
<id>5c998a3eca793caa9cafa3fef4d1b5d07b089157</id>
<content type='text'>
rather than longs.  This also fixes the test for eval(-sys.maxint - 1).
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
rather than longs.  This also fixes the test for eval(-sys.maxint - 1).
</pre>
</div>
</content>
</entry>
<entry>
<title>Patch #1495999: Part two of Windows CE changes.</title>
<updated>2006-06-10T12:23:46+00:00</updated>
<author>
<name>Martin v. Löwis</name>
<email>martin@v.loewis.de</email>
</author>
<published>2006-06-10T12:23:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/cpython.git/commit/?id=1ad9a131d6a2fe83e87d95bf362db3c93a920b9d'/>
<id>1ad9a131d6a2fe83e87d95bf362db3c93a920b9d</id>
<content type='text'>
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- update header checks, using autoconf
- provide dummies for getenv, environ, and GetVersion
- adjust MSC_VER check in socketmodule.c
</pre>
</div>
</content>
</entry>
</feed>
