Benjamin Peterson
cf76d1f0c7
add space
2010-07-02 19:41:39 +00:00
Benjamin Peterson
4c5bc4d7f8
remove unused last argument to property_copy
2010-06-28 02:58:25 +00:00
Ezio Melotti
2f06b78d61
Fix extra space.
2010-06-26 18:44:42 +00:00
Benjamin Peterson
b91338960e
remove INT_MAX assertions; they can fail with large Py_ssize_t #9058
2010-06-22 19:16:37 +00:00
Benjamin Peterson
8e5effaaa4
fix warning with ucs4
2010-06-12 17:47:06 +00:00
Antoine Pitrou
cca3a3f396
Issue #8941 : decoding big endian UTF-32 data in UCS-2 builds could crash
...
the interpreter with characters outside the Basic Multilingual Plane
(higher than 0x10000).
2010-06-11 21:42:26 +00:00
Antoine Pitrou
619f16e194
Issue #8930 : fix some C code indentation
2010-06-09 16:24:00 +00:00
Benjamin Peterson
7dbe3e31c1
remove extra byte and fix comment
2010-06-07 22:32:44 +00:00
Benjamin Peterson
13e934acc0
correctly overflow when indexes are too large
2010-06-07 22:23:23 +00:00
Benjamin Peterson
c4afe2950a
locale grouping strings should end in '\0'
2010-06-07 21:37:09 +00:00
Ezio Melotti
e57e50c8e7
Update PyUnicode_DecodeUTF8 from RFC 2279 to RFC 3629.
...
1) #8271 : when a byte sequence is invalid, only the start byte and all the
valid continuation bytes are now replaced by U+FFFD, instead of replacing
the number of bytes specified by the start byte.
See http://www.unicode.org/versions/Unicode5.2.0/ch03.pdf (pages 94-95);
2) 5- and 6-bytes-long UTF-8 sequences are now considered invalid (no changes
in behavior);
3) Add code and tests to reject surrogates (U+D800-U+DFFF) as defined in
RFC 3629, but leave it commented out since it's not backward compatible;
4) Change the error messages "unexpected code byte" to "invalid start byte"
and "invalid data" to "invalid continuation byte";
5) Add an extensive set of tests in test_unicode;
6) Fix test_codeccallbacks because it was failing after this change.
2010-06-05 17:51:07 +00:00
Mark Dickinson
77acee9567
Fix comment typo.
2010-06-05 12:51:21 +00:00
Mark Dickinson
e4b83e013b
Issue #8627 : Fix "XXX undetected error" from unchecked PyErr_WarnPy3k return.
...
This is just a quick fix: if the warning is turned into an exception, the
exception simply gets ignored.
2010-06-05 12:14:43 +00:00
Mark Dickinson
23f0d6b57b
Issue #8627 : remove out-of-date warning about overriding __cmp__
2010-06-05 11:52:24 +00:00
Benjamin Peterson
d5adb5d73d
_PyObject_LookupSpecial returns a new reference
2010-06-05 02:07:01 +00:00
Benjamin Peterson
67783b1f71
fix ref counting
2010-06-05 01:00:10 +00:00
Benjamin Peterson
039c585805
implement object.__format__ with PyObject_Format
2010-06-05 00:56:46 +00:00
Benjamin Peterson
3a2acb5040
remove PyType_Ready call; float should be initialized in interpreter startup
2010-06-05 00:38:22 +00:00
Benjamin Peterson
2aa6c38237
properly lookup the __format__ special method
2010-06-05 00:32:50 +00:00
Mark Dickinson
4ca7c3c089
Issue #8748 : Fix incorrect results from comparisons between an integer
...
and a complex instance. Based on a patch by Meador Inge.
2010-05-30 13:18:10 +00:00
Mark Dickinson
4b3035d0b8
Remove declaration for unused variable.
2010-05-30 12:17:11 +00:00
Mark Dickinson
813363743d
Issue #5211 : Complete removal of implicit coercions for the complex
...
type. Coercion for arithmetic operations was already removed in
r78280, but that commit didn't remove coercion for rich comparisons.
2010-05-30 12:12:25 +00:00
Georg Brandl
54d2898ef8
#8635 : document enumerate() start parameter in docstring.
2010-05-22 11:43:25 +00:00
Antoine Pitrou
83137c2e16
Issue #7079 : Fix a possible crash when closing a file object while using
...
it from another thread. Patch by Daniel Stutzbach.
2010-05-17 19:56:59 +00:00
Mark Dickinson
43ca377e45
Wrap multiline macros in a 'do {} while(0)', for safety.
2010-05-09 20:42:09 +00:00
Mark Dickinson
fda8d114ea
Post-detabification cleanup: whitespace fixes and long line rewraps only.
2010-05-09 20:30:29 +00:00
Antoine Pitrou
c83ea137d7
Untabify C files. Will watch buildbots.
2010-05-09 14:46:46 +00:00
Mark Dickinson
22ff664ff7
Issue #8659 : Remove redundant ABS calls. Thanks Daniel Stutzbach.
2010-05-08 08:01:19 +00:00
Brett Cannon
a8ac944924
Add back in a line that was unneeded which advanced a pointer, but commented
...
out as it is currently unneeded.
This effectively adds back in the line removed in r80809 as a comment.
2010-05-06 17:56:36 +00:00
Brett Cannon
8a478ced55
Remove an unneeded assignment.
...
Found using Clang's static analyzer.
2010-05-05 20:19:26 +00:00
Brett Cannon
fee3acb082
Remove an unneeded variable assignment.
...
Found using Clang's static analyzer.
2010-05-05 20:18:23 +00:00
Brett Cannon
eb3fef59b9
Remove an unneeded variable.
...
Found using Clang's static analyzer.
2010-05-05 20:16:50 +00:00
Brett Cannon
6f38175cbc
Remove an unneeded variable increment.
...
Found using Clang's static analyzer.
2010-05-05 20:16:09 +00:00
Alexandre Vassalotti
268e4872d3
Issue #8404 : Fix set operations on dictionary views.
2010-05-04 03:21:51 +00:00
Brett Cannon
0d8a859a85
Pull a NULL pointer check up to cover more cases in the function.
...
Found using Clang's static analyzer.
2010-05-04 01:23:36 +00:00
Brett Cannon
a7f13ee3f5
Remove an unneeded variable and assignment.
...
Found using Clang's static analyzer.
2010-05-04 01:16:51 +00:00
Mark Dickinson
328284adcf
Improve error message from nb_int returning a non-integer, in various PyInt_As* functions:
2010-05-02 09:38:43 +00:00
Raymond Hettinger
35b76027f9
Issue 8436: set.__init__ accepts keyword args
2010-04-18 22:57:57 +00:00
Benjamin Peterson
ae530c2bab
tiny simplification
2010-04-16 22:52:44 +00:00
Benjamin Peterson
821a8ea39f
have a clear error when passing something > sys.maxsize to bytearray
2010-04-16 22:35:38 +00:00
Stefan Krah
ef7590e943
Issue #8328 : Silence Visual Studio warnings.
2010-04-07 08:24:44 +00:00
Mark Dickinson
ea7e5510aa
Silence a 'comparison between signed and unsigned integer expressions' gcc warning.
2010-04-06 18:58:54 +00:00
Mark Dickinson
3ec9b942b5
Issue #8259 : Get rid of 'outrageous left shift count' error when
...
left-shifting an integer by more than 2**31 on a 64-bit machine. Also
convert shift counts to a Py_ssize_t instead of a C long.
2010-04-06 16:46:09 +00:00
Mark Dickinson
56506a6ed2
Use a better NaN test in _Py_HashDouble as well.
2010-04-05 18:54:51 +00:00
Mark Dickinson
5e0c2748fb
Use a more robust infinity check in _Py_HashDouble.
...
This fixes a test_decimal failure on FreeBSD 8.0. (modf apparently
doesn't follow C99 Annex F on FreeBSD.)
2010-04-05 18:07:51 +00:00
Raymond Hettinger
30583e3f38
Silence a compiler warning.
2010-04-03 17:10:05 +00:00
Benjamin Peterson
bea424af98
more _PyString_Resize error checking
2010-04-03 00:57:33 +00:00
Benjamin Peterson
6caf7ff505
always check _PyString_Resize for error
...
also normalize how this error is checked
2010-04-02 23:59:41 +00:00
Eric Smith
d44b2fc87c
Issue 7994: Make object.__format__ with a non-empty format string a PendingDecprecationWarning. Still need to remove uses of this from various tests.
2010-04-02 12:30:56 +00:00
Larry Hastings
5ac006dfd3
Capsule-related changes:
...
* PyCObject_AsVoidPtr() can now open capsules. This addresses
most of the remaining backwards-compatibility concerns about
the conversion of Python 2.7 from CObjects to capsules.
* CObjects were marked Pending Deprecation.
* Documentation about this pending deprecation was added to
cobject.h.
* The capsule source files were added to the legacy PC build
processes.
2010-04-02 11:01:35 +00:00