summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* correct static string clearing loop (closes #16906)Benjamin Peterson2013-01-091-6/+9
|
* Issue #11461: Fix the incremental UTF-16 decoder. Original patch bySerhiy Storchaka2013-01-081-1/+4
|\ | | | | | | | | Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP characters.
| * Issue #11461: Fix the incremental UTF-16 decoder. Original patch bySerhiy Storchaka2013-01-081-1/+4
| | | | | | | | | | Amaury Forgeot d'Arc. Added tests for partial decoding of non-BMP characters.
| * Fix out of bound read in UTF-32 decoder on "narrow Unicode" builds.Serhiy Storchaka2013-01-081-1/+1
| |
* | Issue #16856: Fix a segmentation fault from calling repr() on a dict withSerhiy Storchaka2013-01-041-1/+1
| | | | | | | | a key whose repr raise an exception.
* | (Merge 3.2) Issue #16455: On FreeBSD and Solaris, if the locale is C, theVictor Stinner2013-01-031-4/+4
|\ \ | |/ | | | | | | | | | | 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.
| * Issue #16455: On FreeBSD and Solaris, if the locale is C, theVictor Stinner2013-01-031-4/+4
| | | | | | | | | | | | | | 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.
* | Fix the advertised size of PyCFunctionObjects in sys._debugmallocstats().Antoine Pitrou2012-12-301-2/+2
| |
* | Issue #16761: Raise TypeError when int() called with base argument only.Serhiy Storchaka2012-12-281-2/+8
|\ \ | |/
| * Issue #16761: Raise TypeError when int() called with base argument only.Serhiy Storchaka2012-12-281-2/+8
| |
| * Keep y a Py_hash_t instead of Py_uhash_t as it is compared with == -1 and theGregory P. Smith2012-12-111-1/+2
| | | | | | | | | | | | | | 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.
* | try to call __bytes__ before __index__ (closes #16722)Benjamin Peterson2012-12-191-5/+28
| |
* | Fix the internals of our hash functions to used unsigned values during hashGregory P. Smith2012-12-113-11/+11
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
| * Fix the internals of our hash functions to used unsigned values during hashGregory P. Smith2012-12-114-13/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Issue #16602: When a weakref's target was part of a long deallocation chain, ↵Antoine Pitrou2012-12-081-3/+2
|\ \ | |/ | | | | | | | | 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.
| * Issue #16602: When a weakref's target was part of a long deallocation chain, ↵Antoine Pitrou2012-12-081-3/+2
| | | | | | | | | | | | 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.
* | (Merge 3.2) Issue #16416: On Mac OS X, operating system data are now alwaysVictor Stinner2012-12-031-4/+5
|\ \ | |/ | | | | | | | | | | 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.
| * Issue #16416: On Mac OS X, operating system data are now alwaysVictor Stinner2012-12-031-4/+5
| | | | | | | | | | | | | | 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.
* | Issue #16215: Fix potential double memory free in str.replace().Antoine Pitrou2012-11-171-0/+2
| | | | | | | | Patch by Serhiy Storchaka.
* | Issue #16453: Fix equality testing of dead weakref objects.Antoine Pitrou2012-11-111-3/+7
|\ \ | |/ | | | | Also add tests for ordering and hashing.
| * Issue #16453: Fix equality testing of dead weakref objects.Antoine Pitrou2012-11-111-3/+7
| | | | | | | | Also add tests for ordering and hashing.
* | Issue #8271: Fix compilation on WindowsVictor Stinner2012-11-041-1/+1
| |
* | #8271: the utf-8 decoder now outputs the correct number of U+FFFD ↵Ezio Melotti2012-11-042-36/+66
| | | | | | | | characters when used with the "replace" error handler on invalid utf-8 sequences. Patch by Serhiy Storchaka, tests by Ezio Melotti.
* | Issue #16402: Merge fix from 3.2Mark Dickinson2012-11-041-5/+5
|\ \ | |/
| * Issue #16402: In range slicing, fix shadowing of exceptions from __index__ ↵Mark Dickinson2012-11-041-5/+5
| | | | | | | | method.
* | Fix compilation on WindowsChristian Heimes2012-11-031-1/+1
|\ \ | |/
| * Fix compilation on WindowsChristian Heimes2012-11-031-1/+1
| |
* | #8401: merge with 3.2.Ezio Melotti2012-11-031-0/+6
|\ \ | |/
| * #8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now raises an ↵Ezio Melotti2012-11-031-0/+6
| | | | | | | | error.
* | Issue #15814: Use hash function that is compatible with the equalityStefan Krah2012-11-021-0/+8
| | | | | | | | definition from #15573.
* | merge 3.2Benjamin Peterson2012-10-311-1/+1
|\ \ | |/
| * avoid a function call with redundant checks for dict sizeBenjamin Peterson2012-10-311-1/+1
| |
* | merge 3.2 (#16345)Benjamin Peterson2012-10-311-29/+30
|\ \ | |/
| * only fast-path fromkeys() when the constructor returns a empty dict (closes ↵Benjamin Peterson2012-10-311-33/+34
| | | | | | | | #16345)
* | do safety checks on __qualname__ assignmentBenjamin Peterson2012-10-311-0/+2
| |
* | don't shadow the __qualname__ descriptor with __qualname__ in the class's ↵Benjamin Peterson2012-10-311-5/+4
| | | | | | | | __dict__ (closes #16271)
* | merge 3.2 (#16369)Benjamin Peterson2012-10-312-0/+30
|\ \ | |/
| * initialize more global type objects (closes #16369)Benjamin Peterson2012-10-312-0/+30
| |
| * Issue #14700: Fix buggy overflow checks for large precision and width in ↵Mark Dickinson2012-10-283-20/+15
| | | | | | | | new-style and old-style formatting.
* | Issue #16277: merge fix from 3.2Mark Dickinson2012-10-181-0/+8
|\ \ | |/
| * Issue #16277: in PyLong_FromVoidPtr, add missing branch for sizeof(void*) <= ↵Mark Dickinson2012-10-181-0/+8
| | | | | | | | sizeof(long).
* | Close #16160: Subclass support now works for types.SimpleNamespace. Thanks ↵Eric Snow2012-10-171-12/+12
| | | | | | | | to RDM for noticing.
* | Issue #14783: Merge changes from 3.2.Chris Jerdonek2012-10-074-10/+20
|\ \ | |/
| * Issue #14783: Improve int() docstring and also str(), range(), and slice().Chris Jerdonek2012-10-074-9/+19
| | | | | | | | | | | | 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.
* | Issue #16096: Fix signed overflow in Objects/longobject.c. Thanks Serhiy ↵Mark Dickinson2012-10-061-3/+2
| | | | | | | | Storchaka.
* | Issue #16096: Fix several occurrences of potential signed integer overflow. ↵Mark Dickinson2012-10-062-22/+13
| | | | | | | | Thanks Serhiy Storchaka.
* | #16127: remove outdated references to narrow builds. Patch by Serhiy Storchaka.Ezio Melotti2012-10-051-10/+4
| |
* | Fix PyUnicode_Format(): return NULL if PyUnicode_READY(uformat) failedVictor Stinner2012-10-041-1/+3
| | | | | | | | | | This error cannot occur in practice: PyUnicode_FromObject() always return a "ready" string.
* | Fix typo.Ezio Melotti2012-09-281-2/+2
| |
* | Issue #16060: Fix a double DECREF in int() implementation. Thanks Serhiy ↵Mark Dickinson2012-09-271-4/+3
| | | | | | | | Storchaka.