Victor Stinner
f50e187724
Fix compiler warnings: comparison between signed and unsigned numbers
11 years ago
Antoine Pitrou
31084ba528
Issue #23632 : Memoryviews now allow tuple indexing (including for multi-dimensional memoryviews).
11 years ago
Victor Stinner
66aab0c4b5
Issue #23708 : Add _Py_read() and _Py_write() functions to factorize code handle
EINTR error and special cases for Windows.
These functions now truncate the length to PY_SSIZE_T_MAX to have a portable
and reliable behaviour. For example, read() result is undefined if counter is
greater than PY_SSIZE_T_MAX on Linux.
11 years ago
Serhiy Storchaka
009b811d67
Removed unintentional trailing spaces in non-external and non-generated C files.
11 years ago
Victor Stinner
0c39b1b970
Initialize variables to prevent GCC warnings
11 years ago
Ethan Furman
62e977f1b6
Close issue23467: add %r compatibility to bytes and bytearray
11 years ago
Antoine Pitrou
a654510150
Issue #23629 : Fix the default __sizeof__ implementation for variable-sized objects.
11 years ago
Victor Stinner
283f3f8ab3
Issue #23571 : Oops, fix #ifdef assert()
assert() are noop when NDEBUG is defined. We want the opposite.
11 years ago
Victor Stinner
4a7cc88472
Issue #23571 : PyObject_Call(), PyCFunction_Call() and call_function() now
raise a SystemError if a function returns a result and raises an exception.
The SystemError is chained to the previous exception.
Refactor also PyObject_Call() and PyCFunction_Call() to make them more readable.
Remove some checks which became useless (duplicate checks).
Change reviewed by Serhiy Storchaka.
11 years ago
Benjamin Peterson
a915723dc7
fix potential refleak in PyFloat_AsDouble ( closes #23590 )
11 years ago
Benjamin Peterson
e5a853c390
use PyMem_NEW to detect overflow ( closes #23362 )
11 years ago
Larry Hastings
42fc0eb827
Issue #21293 : Remove unnecessary "capsule hack".
11 years ago
Steve Dower
3e96f324dc
Issue #23451 : Update pyconfig.h for Windows to require Vista headers and remove unnecessary version checks.
11 years ago
Serhiy Storchaka
71c6f445cd
Fixed a typo.
11 years ago
Serhiy Storchaka
490055a167
Issue #20204 : Deprecation warning is now raised for builtin type without the
__module__ attribute.
11 years ago
Benjamin Peterson
b808d590a2
fix merge_collapse to actually maintain the invariant it purports to ( closes #23515 )
See
de Gouw, Stijn and Rot, Jurriaan and de Boer, Frank S and Bubel, Richard and Hähnle, Reiner
"OpenJDK’s java.utils.Collection.sort() is broken: The good, the bad and the worst case"
11 years ago
Serhiy Storchaka
e55181f517
Issue #23490 : Fixed possible crashes related to interoperability between
old-style and new API for string with 2**30-1 characters.
11 years ago
Serhiy Storchaka
26861b0b29
Issue #23450 : Fixed possible integer overflows.
11 years ago
Serhiy Storchaka
1a1ff29659
Issue #23446 : Use PyMem_New instead of PyMem_Malloc to avoid possible integer
overflows. Added few missed PyErr_NoMemory().
11 years ago
Serhiy Storchaka
ea5ce5a15e
Issue #23383 : Cleaned up bytes formatting.
11 years ago
Raymond Hettinger
438f9134cf
Mirco-optimizations to reduce register spills and reloads observed on CLANG and GCC.
11 years ago
Steve Dower
b4e20bb588
Fix definition mismatch for type_is_subtype_base_chain.
11 years ago
Benjamin Peterson
104b9e0cca
fix many custom mro() edge cases and improve code quality ( #22735 )
Patch by Eldar Abusalimov.
11 years ago
Raymond Hettinger
8249282622
Minor code clean up.
11 years ago
Raymond Hettinger
06bb1226d1
Issue 23359: Reduce size of code in set_lookkey. Only do linear probes when there is no wrap-around.
Nice simplification contributed by Serhiy Storchaka :-)
11 years ago
Stefan Krah
5178d91be0
Issue #14203 : Remove obsolete support for view==NULL in PyBuffer_FillInfo()
and bytearray_getbuffer(). Both functions now raise BufferError in that
case.
11 years ago
Serhiy Storchaka
83848704f5
Issue #22896 : Fixed using _getbuffer() in recently added _PyBytes_Format().
11 years ago
Serhiy Storchaka
4fdb68491e
Issue #22896 : Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
and PyObject_AsWriteBuffer().
11 years ago
Raymond Hettinger
c658d85487
Issue 23359: Tighten inner search loop for sets (don't and-mask every entry lookup).
11 years ago
Stefan Krah
7213fcc27e
Issue #23370 : Fix off-by-one error for non-contiguous buffers.
11 years ago
Stefan Krah
363af44a4a
Issue #22445 : PyBuffer_IsContiguous() now implements precise contiguity
tests, compatible with NumPy's NPY_RELAXED_STRIDES_CHECKING compilation
flag. Previously the function reported false negatives for corner cases.
11 years ago
Raymond Hettinger
59ecabd12a
Keep the definition of i consistent between set_lookkey() and set_insert_clean().
11 years ago
Raymond Hettinger
9edd753229
Minor tweak to improve code clarity.
11 years ago
Raymond Hettinger
06a1c8dfa0
Fix typo in a comment.
11 years ago
Serhiy Storchaka
aed198426a
Issue #23055 : Fixed read-past-the-end error in PyUnicode_FromFormatV.
11 years ago
Benjamin Peterson
9d4cbcc86b
allow changing __class__ between a heaptype and non-heaptype in some cases ( closes #22986 )
Patch by Nathaniel Smith.
11 years ago
Stefan Krah
fa5d6a5ff3
Issue #22668 : Ensure that format strings survive slicing after casting.
11 years ago
Serhiy Storchaka
e09bcc874a
Issue #22079 : PyType_Ready() now checks that statically allocated type has
no dynamically allocated bases.
11 years ago
Serhiy Storchaka
4dbc305002
Issue #23055 : Fixed a buffer overflow in PyUnicode_FromFormatV. Analysis
and fix by Guido Vranken.
11 years ago
Serhiy Storchaka
3f95292be6
Issue #23055 : Fixed a buffer overflow in PyUnicode_FromFormatV. Analysis
and fix by Guido Vranken.
11 years ago
Raymond Hettinger
f8d1a31e70
Revert unintended part of the commit (the key==dummy test wasn't supposed to change).
11 years ago
Raymond Hettinger
a5ebbf6295
Remove unneeded dummy test from the set search loop (when the hashes match we know the key is not a dummy).
11 years ago
Raymond Hettinger
3037e84ad1
Issue #23269 : Tighten search_loop in set_insert_clean()
Instead of masking and shifting every loopup, move the wrap-around
test outside of the inner-loop.
11 years ago
Victor Stinner
5474d0ba19
Issue #20284 : Fix a compilation warning on Windows
Explicitly cast the long to char.
11 years ago
Victor Stinner
29dacf2e97
Issue #15859 : PyUnicode_EncodeFSDefault(), PyUnicode_EncodeMBCS() and
PyUnicode_EncodeCodePage() now raise an exception if the object is not an
Unicode object. For PyUnicode_EncodeFSDefault(), it was already the case on
platforms other than Windows. Patch written by Campbell Barton.
11 years ago
Benjamin Peterson
a8efc9601d
ensure ilen is initialized when it is assigned to len
11 years ago
Serhiy Storchaka
f4b7a02e93
Issue #21408 : The default __ne__() now returns NotImplemented if __eq__()
returned NotImplemented. Removed incorrect implementations of __ne__().
11 years ago
Raymond Hettinger
b335dfe7fa
Set the hash values of dummy entries to -1. Improves quality of entry->hash == hash tests.
11 years ago
Raymond Hettinger
4d45c1069b
Update out-of-date comments.
11 years ago
Raymond Hettinger
93035c44fd
Issue #23119 : Simplify setobject by inlining the special case for unicode equality testing.
11 years ago