Serhiy Storchaka
ea5ce5a15e
Issue #23383 : Cleaned up bytes formatting.
2015-02-10 23:23:12 +02:00
Raymond Hettinger
438f9134cf
Mirco-optimizations to reduce register spills and reloads observed on CLANG and GCC.
2015-02-09 06:48:29 -06:00
Steve Dower
d327d8d9a4
Fix definition mismatch for type_is_subtype_base_chain.
2015-02-06 08:51:26 -08:00
Steve Dower
b4e20bb588
Fix definition mismatch for type_is_subtype_base_chain.
2015-02-06 08:50:23 -08:00
Benjamin Peterson
6c62ac1a01
merge 3.4 ( #22735 )
2015-02-05 22:29:46 -05:00
Benjamin Peterson
104b9e0cca
fix many custom mro() edge cases and improve code quality ( #22735 )
...
Patch by Eldar Abusalimov.
2015-02-05 22:29:14 -05:00
Raymond Hettinger
8249282622
Minor code clean up.
2015-02-04 08:37:02 -08:00
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 :-)
2015-02-03 08:15:30 -08:00
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.
2015-02-03 16:57:21 +01:00
Serhiy Storchaka
83848704f5
Issue #22896 : Fixed using _getbuffer() in recently added _PyBytes_Format().
2015-02-03 01:49:18 +02:00
Serhiy Storchaka
3dd3e26680
Issue #22896 : Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
...
and PyObject_AsWriteBuffer().
2015-02-03 01:25:42 +02:00
Serhiy Storchaka
4fdb68491e
Issue #22896 : Avoid to use PyObject_AsCharBuffer(), PyObject_AsReadBuffer()
...
and PyObject_AsWriteBuffer().
2015-02-03 01:21:08 +02:00
Raymond Hettinger
c658d85487
Issue 23359: Tighten inner search loop for sets (don't and-mask every entry lookup).
2015-02-02 08:35:00 -08:00
Stefan Krah
2e6658b4a7
Merge from 3.4.
2015-02-01 19:19:49 +01:00
Stefan Krah
7213fcc27e
Issue #23370 : Fix off-by-one error for non-contiguous buffers.
2015-02-01 16:19:23 +01:00
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.
2015-02-01 14:53:54 +01:00
Raymond Hettinger
59ecabd12a
Keep the definition of i consistent between set_lookkey() and set_insert_clean().
2015-01-31 02:45:12 -08:00
Raymond Hettinger
9edd753229
Minor tweak to improve code clarity.
2015-01-30 20:09:23 -08:00
Raymond Hettinger
06a1c8dfa0
Fix typo in a comment.
2015-01-30 18:02:15 -08:00
Benjamin Peterson
9d4cbcc86b
allow changing __class__ between a heaptype and non-heaptype in some cases ( closes #22986 )
...
Patch by Nathaniel Smith.
2015-01-30 13:33:42 -05:00
Stefan Krah
f5324d7074
Closes #22668 : Merge from 3.4.
2015-01-29 14:29:51 +01:00
Stefan Krah
fa5d6a5ff3
Issue #22668 : Ensure that format strings survive slicing after casting.
2015-01-29 14:27:23 +01:00
Serhiy Storchaka
66acbb28ee
Issue #22079 : PyType_Ready() now checks that statically allocated type has
...
no dynamically allocated bases.
2015-01-28 11:06:04 +02:00
Serhiy Storchaka
e09bcc874a
Issue #22079 : PyType_Ready() now checks that statically allocated type has
...
no dynamically allocated bases.
2015-01-28 11:03:33 +02:00
Raymond Hettinger
f8d1a31e70
Revert unintended part of the commit (the key==dummy test wasn't supposed to change).
2015-01-26 22:06:43 -08:00
Raymond Hettinger
a5ebbf6295
Remove unneeded dummy test from the set search loop (when the hashes match we know the key is not a dummy).
2015-01-26 21:54:35 -08:00
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.
2015-01-26 21:33:48 -08:00
Victor Stinner
5474d0ba19
Issue #20284 : Fix a compilation warning on Windows
...
Explicitly cast the long to char.
2015-01-26 16:43:36 +01:00
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.
2015-01-26 16:41:32 +01:00
Benjamin Peterson
a8efc9601d
ensure ilen is initialized when it is assigned to len
2015-01-26 09:23:41 -05:00
Serhiy Storchaka
34af5023fc
Issue #21408 : The default __ne__() now returns NotImplemented if __eq__()
...
returned NotImplemented. Removed incorrect implementations of __ne__().
2015-01-26 10:04:15 +02:00
Serhiy Storchaka
f4b7a02e93
Issue #21408 : The default __ne__() now returns NotImplemented if __eq__()
...
returned NotImplemented. Removed incorrect implementations of __ne__().
2015-01-26 09:57:07 +02:00
Raymond Hettinger
b335dfe7fa
Set the hash values of dummy entries to -1. Improves quality of entry->hash == hash tests.
2015-01-25 16:38:52 -08:00
Raymond Hettinger
4d45c1069b
Update out-of-date comments.
2015-01-25 16:27:40 -08:00
Raymond Hettinger
93035c44fd
Issue #23119 : Simplify setobject by inlining the special case for unicode equality testing.
2015-01-25 16:12:49 -08:00
Serhiy Storchaka
bbd3aa8ece
Issue #23321 : Fixed a crash in str.decode() when error handler returned
...
replacment string longer than mailformed input data.
2015-01-26 01:24:31 +02:00
Serhiy Storchaka
7e4b9057b3
Issue #23321 : Fixed a crash in str.decode() when error handler returned
...
replacment string longer than mailformed input data.
2015-01-26 01:22:54 +02:00
Ethan Furman
b95b56150f
Issue20284: Implement PEP461
2015-01-23 20:05:18 -08:00
Raymond Hettinger
ed741d4ff0
A hybrid of and-masking and a conditional-set-to-zero produce even faster search loop.
2015-01-18 21:25:15 -08:00
Raymond Hettinger
bd9b200b87
Update copyright for 2015 updates.
2015-01-18 16:10:30 -08:00
Raymond Hettinger
9cd6a789c6
Clean-up, simplify, and slightly speed-up bounds logic in set_pop().
...
Elsewhere in the setobject.c code we do a bitwise-and with the mask
instead of using a conditional to reset to zero on wrap-around.
Using that same technique here use gives cleaner, faster, and more
consistent code.
2015-01-18 16:06:18 -08:00
Raymond Hettinger
1202a4733e
Issue 23261: Clean-up the hack to store the set.pop() search finger in a hash field instead of the setobject.
2015-01-18 13:12:42 -08:00
Serhiy Storchaka
82e07b92b3
Issue #23181 : More "codepoint" -> "code point".
2015-01-18 11:33:31 +02:00
Serhiy Storchaka
d3faf43f9b
Issue #23181 : More "codepoint" -> "code point".
2015-01-18 11:28:37 +02:00
Benjamin Peterson
645f896536
merge 3.4 ( #23210 )
2015-01-09 16:40:38 -06:00
Benjamin Peterson
bcf8554fd4
remove buzzword ( closes #23210 )
2015-01-09 16:40:23 -06:00
Raymond Hettinger
8edf27c134
Small clean-up. Factor-out common code for add, contains, and discard function pairs.
2014-12-26 23:08:58 -08:00
Raymond Hettinger
08e3dc0ad6
Issue #23107 : Tighten-up loops in setobject.c
...
* Move the test for an exact key match to after a hash match
* Use "used" as a loop counter instead of "fill"
* Minor improvements to variable names and code consistency
2014-12-26 20:14:00 -08:00
Serhiy Storchaka
707b5ccde5
Issue #22783 : Pickling now uses the NEWOBJ opcode instead of the NEWOBJ_EX
...
opcode if possible.
2014-12-16 19:43:46 +02:00
Serhiy Storchaka
b757c83ec6
Issue #22581 : Use more "bytes-like object" throughout the docs and comments.
2014-12-05 22:25:22 +02:00