Serhiy Storchaka
4fb8caee87
Issue #14850 : Now a chamap decoder treates U+FFFE as "undefined mapping"
in any mapping, not only in an unicode string.
13 years ago
Benjamin Peterson
0c270a8bb7
correct static string clearing loop ( closes #16906 )
13 years ago
Serhiy Storchaka
48e188e573
Issue #11461 : Fix the incremental UTF-16 decoder. Original patch by
Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP
characters.
13 years ago
Serhiy Storchaka
dec798eb46
Fix out of bound read in UTF-32 decoder on "narrow Unicode" builds.
13 years ago
Serhiy Storchaka
6c83e739d7
Issue #16856 : Fix a segmentation fault from calling repr() on a dict with
a key whose repr raise an exception.
13 years ago
Victor Stinner
20b654acb5
Issue #16455 : On FreeBSD and Solaris, if the locale is C, the
ASCII/surrogateescape codec is now used, instead of the locale encoding, to
decode the command line arguments. This change fixes inconsistencies with
os.fsencode() and os.fsdecode() because these operating systems announces an
ASCII locale encoding, whereas the ISO-8859-1 encoding is used in practice.
13 years ago
Gregory P. Smith
27cbcd6241
Fix the internals of our hash functions to used unsigned values during hash
computation as the overflow behavior of signed integers is undefined.
In practice we require compiling everything with -fwrapv which forces overflow
to be defined as twos compliment but this keeps the code cleaner for checkers
or in the case where someone has compiled it without -fwrapv or their
compiler's equivalent.
Found by Clang trunk's Undefined Behavior Sanitizer (UBSan).
Cleanup only - no functionality or hash values change.
13 years ago
Victor Stinner
27b1ca29cc
Issue #16416 : On Mac OS X, operating system data are now always
encoded/decoded to/from UTF-8/surrogateescape, instead of the locale encoding
(which may be ASCII if no locale environment variable is set), to avoid
inconsistencies with os.fsencode() and os.fsdecode() functions which are
already using UTF-8/surrogateescape.
13 years ago
Antoine Pitrou
6d5ad227a5
Issue #16215 : Fix potential double memory free in str.replace().
Patch by Serhiy Storchaka.
13 years ago
Antoine Pitrou
e3ae321222
Issue #15379 : Fix passing of non-BMP characters as integers for the charmap decoder (already working as unicode strings).
Patch by Serhiy Storchaka.
13 years ago
Ezio Melotti
f7ed5d111b
#8271 : the utf-8 decoder now outputs the correct number of U+FFFD characters when used with the "replace" error handler on invalid utf-8 sequences. Patch by Serhiy Storchaka, tests by Ezio Melotti.
13 years ago
Benjamin Peterson
c43112823b
initialize more global type objects ( closes #16369 )
13 years ago
Benjamin Peterson
6da3ed63d8
initialize more global type objects ( closes #16369 )
13 years ago
Mark Dickinson
fb90c0934c
Issue #14700 : Fix buggy overflow checks for large precision and width in new-style and old-style formatting.
13 years ago
Mark Dickinson
75d3600466
Issue #14700 : Fix buggy overflow checks for large precision and width in new-style and old-style formatting.
13 years ago
Chris Jerdonek
ad4b000179
Issue #14783 : Backport changes from 3.2.
14 years ago
Chris Jerdonek
83fe2e1c22
Issue #14783 : Improve int() docstring and also str(), range(), and slice().
This commit rewrites the docstring for int() to incorporate the documentation
changes made in issue #16036 . It also switches the docstrings for int(),
str(), range(), and slice() to use multi-line signatures.
14 years ago
Mark Dickinson
c04ddff290
Issue #16096 : Fix several occurrences of potential signed integer overflow. Thanks Serhiy Storchaka.
14 years ago
Ezio Melotti
e7f90375b1
#16127 : remove outdated references to narrow builds. Patch by Serhiy Storchaka.
14 years ago
Victor Stinner
1929407406
Fix PyUnicode_Format(): return NULL if PyUnicode_READY(uformat) failed
This error cannot occur in practice: PyUnicode_FromObject() always return
a "ready" string.
14 years ago
Antoine Pitrou
6f80f5d444
Issue #15379 : Fix passing of non-BMP characters as integers for the charmap decoder (already working as unicode strings).
Patch by Serhiy Storchaka.
14 years ago
Antoine Pitrou
ca8aa4acf6
Issue #15144 : Fix possible integer overflow when handling pointers as integer values, by using Py_uintptr_t instead of size_t.
Patch by Serhiy Storchaka.
14 years ago
Christian Heimes
5f520f4fed
Issue #15900 : Fixed reference leak in PyUnicode_TranslateCharmap()
14 years ago
Christian Heimes
fd30236494
Fixed memory leak in error branch of formatfloat(). CID 719687
14 years ago
Christian Heimes
f4f9939a96
Fixed memory leak in error branch of formatfloat(). CID 719687
14 years ago
Christian Heimes
bdc7e69f42
Issue #15900 : Fixed reference leak in PyUnicode_TranslateCharmap()
14 years ago
Antoine Pitrou
057119b0b7
Fix C++-style comment (xlc compilation failure)
14 years ago
Benjamin Peterson
28a6cfaefc
use the stricter PyMapping_Check ( closes #15801 )
14 years ago
Benjamin Peterson
23d49d3e7e
use the stricter PyMapping_Check ( closes #15801 )
14 years ago
Stefan Krah
8528c3145e
Issue #15728 : Fix leak in PyUnicode_AsWideCharString(). Found by Coverity.
14 years ago
Nick Coghlan
573b1fd779
Fix str docstring
14 years ago
Antoine Pitrou
715a63b783
Issue #14579 : Fix error handling bug in the utf-16 decoder.
Patch by Serhiy Storchaka.
14 years ago
Antoine Pitrou
b4bbee25b1
Issue #14579 : Fix CVE-2012-2135: vulnerability in the utf-16 decoder after error handling.
Patch by Serhiy Storchaka.
14 years ago
Mark Dickinson
01ac8b6ab1
Use correct types for ASCII_CHAR_MASK integer constants.
14 years ago
Antoine Pitrou
aaefac76dd
Issue #14874 : Restore charmap decoding speed to pre-PEP 393 levels.
Patch by Serhiy Storchaka.
14 years ago
Victor Stinner
f185226244
_copy_characters(): move debug code at the top to avoid noisy #ifdef
And don't use assert() anymore if check_maxchar is set: return -1 on error
instead.
14 years ago
Victor Stinner
07621338fb
Fix PyUnicode_GetSize(): Don't replace _PyUnicode_Ready() exception
14 years ago
Victor Stinner
8a8b3eaabe
Fix a compiler warning in _copy_characters() and remove debug code
14 years ago
Victor Stinner
24e403bbee
Oops, fix my previous change on _copy_characters()
14 years ago
Victor Stinner
ca439eecea
Fix unicode_adjust_maxchar(): catch PyUnicode_New() failure
14 years ago
Victor Stinner
184252ad3f
Fix "%f" format of str%args if the result is not an ASCII or latin1 string
14 years ago
Victor Stinner
9a77770add
Remove debug code
14 years ago
Victor Stinner
c9d369f1bf
Optimize _PyUnicode_FastCopyCharacters() when maxchar(from) > maxchar(to)
14 years ago
Victor Stinner
f05e17ece9
unicodeobject.c: Remove debug code
14 years ago
Antoine Pitrou
27f6a3b0bf
Issue #15026 : utf-16 encoding is now significantly faster (up to 10x).
Patch by Serhiy Storchaka.
14 years ago
Kristján Valur Jónsson
55e5dc8371
Rearrange code to beat an optimizer bug affecting Release x64 on windows
with VS2010sp1
14 years ago
Victor Stinner
d7b7c7472b
Issue #14993 : Use standard "unsigned char" instead of a unsigned char bitfield
14 years ago
Raymond Hettinger
aad5b02e62
Improve tooltips for splitlines() by showing that the default for keepends is False.
14 years ago
Kristjan Valur Jonsson
85634d7a2e
Issue #14909 : A number of places were using PyMem_Realloc() apis and
PyObject_GC_Resize() with incorrect error handling. In case of errors,
the original object would be leaked. This checkin fixes those cases.
14 years ago
Victor Stinner
3a7d096f2f
Issue #14744 : Fix compilation on Windows (part 2)
14 years ago