Serhiy Storchaka
48070c1248
Issue #23803 : Fixed str.partition() and str.rpartition() when a separator
is wider then partitioned string.
11 years ago
Serhiy Storchaka
1009bf18b3
Issue #23501 : Argumen Clinic now generates code into separate files by default.
11 years ago
Victor Stinner
1912b39def
_PyUnicodeWriter_WriteStr() now checks that the input string is consistent
in debug mode to detect bugs earlier.
_PyUnicodeWriter_Finish() doesn't check if the read only string is consistent,
whereas it does check consistency for strings built by itself.
11 years ago
Serhiy Storchaka
d9d769fcdd
Issue #23573 : Increased performance of string search operations (str.find,
str.index, str.count, the in operator, str.split, str.partition) with
arguments of different kinds (UCS1, UCS2, UCS4).
11 years ago
Victor Stinner
f50e187724
Fix compiler warnings: comparison between signed and unsigned numbers
11 years ago
Victor Stinner
0c39b1b970
Initialize variables to prevent GCC warnings
11 years ago
Benjamin Peterson
e5a853c390
use PyMem_NEW to detect overflow ( closes #23362 )
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
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
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
aed198426a
Issue #23055 : Fixed read-past-the-end error in PyUnicode_FromFormatV.
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
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
Serhiy Storchaka
7e4b9057b3
Issue #23321 : Fixed a crash in str.decode() when error handler returned
replacment string longer than mailformed input data.
11 years ago
Ethan Furman
b95b56150f
Issue20284: Implement PEP461
11 years ago
Serhiy Storchaka
d3faf43f9b
Issue #23181 : More "codepoint" -> "code point".
11 years ago
Serhiy Storchaka
b757c83ec6
Issue #22581 : Use more "bytes-like object" throughout the docs and comments.
11 years ago
Serhiy Storchaka
133b11b566
Issue #22975 : Close block at right place.
11 years ago
Victor Stinner
3aa979e0cd
Issue #20948 : Inline makefmt() in unicode_fromformat_arg()
11 years ago
Antoine Pitrou
b6dc9b7554
Fixed signed/unsigned comparison warning
11 years ago
Antoine Pitrou
4e334241b7
Fixed signed/unsigned comparison warning
11 years ago
Benjamin Peterson
1e211ff10d
it suffices to check for PY_SSIZE_T_MAX overflow ( #22643 )
11 years ago
Benjamin Peterson
c0e64f5027
make sure length is unsigned
11 years ago
Benjamin Peterson
e1bd38c03c
fix integer overflow in unicode case operations ( closes #22643 )
11 years ago
Georg Brandl
ff3e5e3779
Fix unicode_aswidechar() for 4b unicode and 2b wchar_t (AIX).
11 years ago
Gregory P. Smith
8486f9b134
Fix "warning: comparison between signed and unsigned integer expressions"
-Wsign-compare warnings in unicodeobject.c. These were all a result
of sizeof() being unsigned and being compared to a Py_ssize_t.
Not actual problems.
11 years ago
Benjamin Peterson
736b8012b4
prevent overflow in unicode_repr ( closes #22520 )
11 years ago
Benjamin Peterson
a1c1be4e03
cleanup overflowing handling in unicode_decode_call_errorhandler and unicode_encode_ucs1 ( closes #22518 )
11 years ago
Serhiy Storchaka
20b39b27d9
Removed redundant casts to `char *`.
Corresponding functions now accept `const char *` (issue #1772673 ).
11 years ago
Serhiy Storchaka
d8a1447c99
Issue #22215 : Now ValueError is raised instead of TypeError when str or bytes
argument contains not permitted null character or byte.
11 years ago
Victor Stinner
12174a5dca
Issue #22156 : Fix "comparison between signed and unsigned integers" compiler
warnings in the Objects/ subdirectory.
PyType_FromSpecWithBases() and PyType_FromSpec() now reject explicitly negative
slot identifiers.
12 years ago
Victor Stinner
f6a271ae98
Issue #18395 : Rename ``_Py_char2wchar()`` to func:`Py_DecodeLocale`, rename
``_Py_wchar2char()`` to func:`Py_EncodeLocale`, and document these
functions.
12 years ago
Victor Stinner
e1f17c6c0b
unicodeobject.c: fix a compiler warning on Windows 64 bits
12 years ago
Victor Stinner
a33bce0945
Issue #21892 , #21893 : Partial revert of changeset 4f55e802baf0, PyErr_Format()
uses "%zd" for Py_ssize_t, not PY_FORMAT_SIZE_T
12 years ago
Victor Stinner
293f3f526d
Closes #21892 , #21893 : Use PY_FORMAT_SIZE_T instead of %zi or %zu to format C
size_t, because %zi/%u is not supported on all platforms.
12 years ago
Victor Stinner
4dd25256e2
Issue #21118 : PyLong_AS_LONG() result type is long
Even if PyLong_AS_LONG() cannot fail, I prefer to use the right type.
12 years ago
Benjamin Peterson
1365de764e
fix reference leaks in the translate fast path ( closes #21175 )
Patch by Josh Rosenberg.
12 years ago
Victor Stinner
872b291b96
Issue #21118 : Optimize also str.translate() for ASCII => ASCII deletion
12 years ago
Victor Stinner
4ff33af257
Issue #21118 : Add unit test for invalid character replacement (code point higher than U+10ffff)
12 years ago
Victor Stinner
89a76abf20
Issue #21118 : Optimize str.translate() for ASCII => ASCII translation
12 years ago
Victor Stinner
8a4422e78d
Issue #21118 : Remove unused variable
12 years ago
Victor Stinner
1194ea020c
Issue #21118 : Use _PyUnicodeWriter API in str.translate() to simplify and
factorize the code
12 years ago
Ethan Furman
9ab748013b
Issue19995: more informative error message; spelling corrections; use operator.mod instead of __mod__
12 years ago
Ethan Furman
38d872ee5d
Issue19995: passing a non-int to %o, %c, %x, or %X now raises an exception
12 years ago
Victor Stinner
7d00cc1a64
Issue #20574 : Implement incremental decoder for cp65001 code
(Windows code page 65001, Microsoft UTF-8).
12 years ago
Kristján Valur Jónsson
25dded041f
Make the various iterators' "setstate" sliently and consistently clip the
index. This avoids the possibility of setting an iterator to an invalid
state.
12 years ago
Serhiy Storchaka
94ee389308
Issue #19619 : Blacklist non-text codecs in method API
str.encode, bytes.decode and bytearray.decode now use an
internal API to throw LookupError for known non-text encodings,
rather than attempting the encoding or decoding operation and
then throwing a TypeError for an unexpected output type.
The latter mechanism remains in place for third party non-text
encodings.
Backported changeset d68df99d7a57.
12 years ago
Benjamin Peterson
9743b2c2b5
give non-iterable TypeError a message ( closes #20507 )
12 years ago
Serhiy Storchaka
505ff755d7
Issue #20437 : Fixed 21 potential bugs when deleting objects references.
12 years ago