| Commit message (Collapse) | Author | Age | Files | Lines |
|\ |
|
| |\ |
|
| | | |
|
| |\ \
| | |/
| | |
| | |
| | |
| | | |
when result of PyLong_AsLong() narrowed to int without checks.
This is a backport of changesets 13e2e44db99d and 525407d89277.
|
| | |
| | |
| | |
| | |
| | |
| | | |
when result of PyLong_AsLong() narrowed to int without checks.
This is a backport of changesets 13e2e44db99d and 525407d89277.
|
|\ \ \
| |/ /
| | |
| | | |
in any mapping, not only in an unicode string.
|
| |\ \
| | |/
| | |
| | | |
in any mapping, not only in an unicode string.
|
| | |
| | |
| | |
| | | |
in any mapping, not only in an unicode string.
|
|\ \ \
| |/ /
| | |
| | | |
There is no guarantee that NULL is aligned.
|
| | |
| | |
| | |
| | | |
There is no guarantee that NULL is aligned.
|
| | |
| | |
| | |
| | | |
when result of PyLong_AsLong() narrowed to int without checks.
|
|\ \ \
| |/ / |
|
| | | |
|
|\ \ \
| |/ /
| | |
| | |
| | | |
Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP
characters.
|
| |\ \
| | |/
| | |
| | |
| | | |
Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP
characters.
|
| | |
| | |
| | |
| | |
| | | |
Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP
characters.
|
| | | |
|
| | |
| | |
| | |
| | | |
memorize the hash value, but the feature request was rejected because no speed ups were found.
|
|\ \ \
| |/ /
| | |
| | | |
a key whose repr raise an exception.
|
| | |
| | |
| | |
| | | |
a key whose repr raise an exception.
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
"honor direction and do a forward or backwards search": the runtime speed may
be different, but I consider that it doesn't really matter in practice. The
direction was never honored before: Python 2.7 uses memcmp() for the str type
for example.
|
|\ \ \
| |/ / |
|
| | | |
|
|\ \ \
| |/ / |
|
| |\ \
| | |/ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
compiler logic will do the right thing with just x as a Py_uhash_t. This
matches what was already done in the 3.3 version.
cleanup only - no functionality or hash values change.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
objects as the base by using PyNumber_AsSsize_t similar to round().
|
| | |
| | |
| | |
| | | |
Consistent with the behavior in Python 2.
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | | |
object.__format__
Patch by Florent Xicluna.
|
|\ \ \
| |/ / |
|
| | | |
|
| | |
| | |
| | |
| | | |
Patch by Serhiy Storchaka.
|
| | |
| | |
| | |
| | | |
sys.getallocatedblocks() return 0 in that situation.
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
computation as the overflow behavior of signed integers is undefined.
NOTE: This change is smaller compared to 3.2 as much of this cleanup had
already been done. I added the comment that my change in 3.2 added so that the
code would match up. Otherwise this just adds or synchronizes appropriate UL
designations on some constants to be pedantic.
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. We could work to get rid of the -fwrapv requirement
in 3.4 but that requires more planning.
Found by Clang trunk's Undefined Behavior Sanitizer (UBSan).
Cleanup only - no functionality or hash values change.
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
computation as the overflow behavior of signed integers is undefined.
NOTE: This change is smaller compared to 3.2 as much of this cleanup had
already been done. I added the comment that my change in 3.2 added so that the
code would match up. Otherwise this just adds or synchronizes appropriate UL
designations on some constants to be pedantic.
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | | |
number of memory blocks currently allocated.
Also, the ``-R`` option to regrtest uses this function to guard against memory allocation leaks.
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | | |
the object could remain reachable through its weakref even though its refcount had dropped to zero.
Thanks to Eugene Toder for diagnosing and reporting the issue.
|
| |\ \
| | |/
| | |
| | |
| | |
| | | |
the object could remain reachable through its weakref even though its refcount had dropped to zero.
Thanks to Eugene Toder for diagnosing and reporting the issue.
|
| | |
| | |
| | |
| | |
| | |
| | | |
the object could remain reachable through its weakref even though its refcount had dropped to zero.
Thanks to Eugene Toder for diagnosing and reporting the issue.
|
| |\ \
| | |/
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
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.
|
| | |
| | |
| | |
| | |
| | |
| | | |
The NULL encoding check in bytes_decode() was unnecessary because this case
is already taken care of by the call to _Py_normalize_encoding() inside
PyUnicode_Decode().
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
* Remove micro-optization:
(errors == "surrogateescape" || strcmp(errors, "surrogateescape") == 0).
Only use strcmp()
* Initialize 'arg' members in unicode_format_arg() to help the compiler to
diagnose real bugs and also make the code simpler to read
|