summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Issue #14850: Now a chamap decoder treates U+FFFE as "undefined mapping"Serhiy Storchaka2013-01-151-21/+25
| | | | in any mapping, not only in an unicode string.
* 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 #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 #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.
* 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 #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 #16453: Fix equality testing of dead weakref objects.Antoine Pitrou2012-11-111-3/+7
| | | | Also add tests for ordering and hashing.
* 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
|
* #8401: assigning an int to a bytearray slice (e.g. b[3:4] = 5) now raises an ↵Ezio Melotti2012-11-031-0/+6
| | | | error.
* avoid a function call with redundant checks for dict sizeBenjamin Peterson2012-10-311-1/+1
|
* only fast-path fromkeys() when the constructor returns a empty dict (closes ↵Benjamin Peterson2012-10-311-33/+34
| | | | #16345)
* 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: in PyLong_FromVoidPtr, add missing branch for sizeof(void*) <= ↵Mark Dickinson2012-10-181-0/+8
| | | | sizeof(long).
* 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 #15379: Fix passing of non-BMP characters as integers for the charmap ↵Antoine Pitrou2012-09-231-2/+26
| | | | | | decoder (already working as unicode strings). Patch by Serhiy Storchaka.
* Issue 15959: Fix type mismatch for quick{_neg}_int_allocs. Thanks Serhiy ↵Mark Dickinson2012-09-201-1/+1
| | | | Storchaka.
* Silence compiler warnings on Solaris 10 via explicit (void *) casts.Trent Nelson2012-09-191-3/+3
| | | | (Compiler: Solaris Studio 12.3)
* Fix out of bounds read in long_new() for empty bytes with an explicit base. ↵Christian Heimes2012-09-121-2/+2
| | | | int(b'', somebase) calls PyLong_FromString() with char* of length 1 but the function accesses the first argument at offset 1. CID 715359
* Fixed memory leak in error branch of object_repr which may leak a reference ↵Christian Heimes2012-09-101-1/+3
| | | | to mod when type_name returns NULL. CID 715371
* Fixed possible reference leak to mod when type_name() returns NULLChristian Heimes2012-09-101-1/+3
|
* PyTuple_Pack() was missing va_end() in its error branch which lead to a ↵Christian Heimes2012-09-101-1/+3
| | | | resource leak.
* Py_TYPE() has already dereferenced self before the NULL check. Moved ↵Christian Heimes2012-09-101-1/+2
| | | | Py_TYPE() after the check for self == NULL
* Issue #13992: The trashcan mechanism is now thread-safe. This eliminatesAntoine Pitrou2012-09-052-0/+42
| | | | | | | | | | | sporadic crashes in multi-thread programs when several long deallocator chains ran concurrently and involved subclasses of built-in container types. Because of this change, a couple extension modules compiled for 3.2.4 (those which use the trashcan mechanism, despite it being undocumented) will not be loadable by 3.2.3 and earlier. However, extension modules compiled for 3.2.3 and earlier will be loadable by 3.2.4.
* Issue #15855: added docstrings for memoryview methods and data descriptors.Alexander Belopolsky2012-09-031-11/+43
|
* use the stricter PyMapping_Check (closes #15801)Benjamin Peterson2012-08-281-2/+1
|
* Issue #15736: Fix overflow in _PySequence_BytesToCharpArray().Stefan Krah2012-08-211-0/+7
|
* Issue #15732: Fix (constructed) crash in _PySequence_BytesToCharpArray().Stefan Krah2012-08-201-0/+5
| | | | Found by Coverity.
* Check for NULL return value in PyStructSequence_NewType(). Found by Coverity.Stefan Krah2012-08-191-1/+3
|
* Fix str docstringNick Coghlan2012-08-161-4/+8
|
* Issue #15604: Update uses of PyObject_IsTrue() to check for and handle ↵Antoine Pitrou2012-08-151-5/+7
| | | | | | errors correctly. Patch by Serhiy Storchaka.
* Issue #14579: Fix CVE-2012-2135: vulnerability in the utf-16 decoder after ↵Antoine Pitrou2012-07-201-31/+21
| | | | | | error handling. Patch by Serhiy Storchaka.
* Issue #15404: Refleak in PyMethodObject repr.Andrew Svetlov2012-07-201-1/+3
|
* Issue #15394: Fix ref leaks in PyModule_Create.Meador Inge2012-07-191-1/+7
| | | | Patch by Julia Lawall.
* Issue #15142: Fix reference leak when deallocating instances of types ↵Antoine Pitrou2012-06-231-0/+6
| | | | created using PyType_FromSpec().
* Issue #14829: Fix bisect and range() indexing with large indices (>= 2 ** ↵Antoine Pitrou2012-05-161-1/+1
| | | | 32) under 64-bit Windows.
* Remove tab charactersAntoine Pitrou2012-05-141-8/+8
|
* Use size_t, not ssize_t (issue #14801).Antoine Pitrou2012-05-141-1/+1
|
* fix possible refleak (closes #14752)Benjamin Peterson2012-05-081-2/+4
|
* close() doesn't take any args (closes #14717)Benjamin Peterson2012-05-031-1/+1
|
* fix calling the classmethod descriptor directly (closes #14699)Benjamin Peterson2012-05-011-3/+41
|
* don't use a slot wrapper from a different special method (closes #14658)Benjamin Peterson2012-04-241-2/+3
| | | | | | | This also alters the fix to #11603. Specifically, setting __repr__ to object.__str__ now raises a recursion RuntimeError when str() or repr() is called instead of silently bypassing the recursion. I believe this behavior is more correct.
* Issue #14630: Fix an incorrect access of ob_digit[0] for a zero instance of ↵Mark Dickinson2012-04-201-3/+1
| | | | an int subclass.
* SETUP_WITH acts like SETUP_FINALLY for the purposes of setting f_lineno ↵Benjamin Peterson2012-04-181-2/+4
| | | | (closes #14612)
* merge 3.1 (#14509)Benjamin Peterson2012-04-092-0/+4
|\
| * fix build without Py_DEBUG and DNDEBUG (closes #14509)Benjamin Peterson2012-04-092-0/+4
| |