summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* Added checks for integer overflows, contributed by Google. Some areMartin v. Löwis2008-02-143-6/+27
| | | | | only available if asserts are left in the code, in cases where they can't be triggered from Python code.
* Fix typo in constant name.Thomas Wouters2008-01-251-1/+1
|
* Use the right (portable) definition of the max of a Py_ssize_t.Thomas Wouters2008-01-251-1/+1
|
* Rewrite the list_inline_repeat overflow check slightly differently.Guido van Rossum2008-01-251-4/+5
|
* Backport r60246.Guido van Rossum2008-01-241-0/+5
| | | | Fix issue #1303614, test67.py.
* Backport r55080:Guido van Rossum2008-01-181-4/+85
| | | | | | Fix for #1303614 and #1174712: - __dict__ descriptor abuse for subclasses of built-in types - subclassing from both ModuleType and another built-in types
* Fix an edge case whereby the __del__() method of a classic class couldGuido van Rossum2008-01-181-0/+10
| | | | create a new weakref to the object.
* merge -r59315:59316 from py3k: Fix issue #1553: An errornous __length_hint__ ↵Christian Heimes2007-12-052-4/+6
| | | | can make list() raise a SystemError
* Spaces vs. Tabs.Georg Brandl2007-11-291-4/+4
| | | | (backport from rev. 59224)
* Fix bug #1517, a possible segfault in lookup().Guido van Rossum2007-11-291-0/+4
|
* Issue #1445: Fix a SystemError when accessing the ``cell_contents``Amaury Forgeot d'Arc2007-11-241-1/+6
| | | | | | attribute of an empty cell object. Now a ValueError is raised. Backport of r59170.
* Issue 1704621. Fix segfaults in list_repeat() and list_inplace_repeat().Guido van Rossum2007-11-121-5/+7
| | | | The C changes aren't quite the same as the patch given there; the test is.
* Backport r58892.Guido van Rossum2007-11-071-0/+1
| | | | Add missing "return NULL" in overflow check in PyString_Repr().
* Backport r58709 from trunk:Georg Brandl2007-11-022-7/+12
| | | | | | | | | Backport fixes for the code that decodes octal escapes (and for PyString also hex escapes) -- this was reaching beyond the end of the input string buffer, even though it is not supposed to be \0-terminated. This has no visible effect but is clearly the correct thing to do. (In 3.0 it had a visible effect after removing ob_sstate from PyString.) Also fixes #1098.
* Cause passing a string to generator.throw() to raise a deprecation warning.Brett Cannon2007-09-111-0/+6
|
* Bug #1763149: use proper slice syntax in docstring.Georg Brandl2007-07-292-4/+4
| | | | (backport)
* Patch #1673759: add a missing overflow check when formatting floatsGeorg Brandl2007-07-122-2/+4
| | | | | with %G. (backport from rev. 56298)
* Backport 55874:Neal Norwitz2007-06-112-4/+16
| | | | | Fix a bug when there was a newline in the string expandtabs was called on. This also catches another condition that can overflow.
* Prevent expandtabs() on string and unicode objects from causing a segfault whenNeal Norwitz2007-06-092-6/+28
| | | | | | | a large width is passed on 32-bit platforms. Found by Google. It would be good for people to review this especially carefully and verify I don't have an off by one error and there is no other way to cause overflow.
* Bug #1733488: Fix compilation of bufferobject.c on AIX.Martin v. Löwis2007-06-081-1/+1
|
* Add what looks like a necessary call to PyErr_NoMemory() when PyMem_MALLOC()Neal Norwitz2007-05-161-1/+1
| | | | fails.
* Merge change 54982 from the trunk. This fixes the test_subprocess test in ↵Kristján Valur Jónsson2007-05-071-8/+7
| | | | the testsuite for VisualStudio2005 builds, by "sanitizing" the "mode" that is used in the posixmodule's fdopen(). In particular the non-standard "U" mode character is removed.
* the nb_long slot on classobject instances now defaults to call the nb_int ↵Kristján Valur Jónsson2007-05-071-1/+13
| | | | slot member if there is no __long__ attribute found. This is in accordance with a suggestion from Armin Rigo, and allows the test_getargs2.py test in the testsuite for x64
* Fix two problems that emerged when the testsuite was run with an x64 build: ↵Kristján Valur Jónsson2007-05-071-1/+1
| | | | PyLong_FromSSize_t incorrectly assumed an unsigned object, and itertools.count() had the wrong upper limit for the iterator.
* Backport r54757 - missing NULL checks.Georg Brandl2007-04-212-0/+10
|
* Revert 53667Raymond Hettinger2007-04-181-7/+7
|
* Revert SF #1615701 (rev 53655): dict.update() does *not* call __getitem__() orNeal Norwitz2007-04-161-1/+1
| | | | | | | keys() if subclassed. This is to remain consistent with 2.5. See discussion here: http://mail.python.org/pipermail/python-dev/2007-April/072565.html
* Revert 54813 for 2.5.1 release. Can be applied after 2.5 branch is unfrozen.Neal Norwitz2007-04-161-2/+2
|
* Fix a bug when using the __lltrace__ opcode tracer, and a problem sith ↵Kristján Valur Jónsson2007-04-131-2/+2
| | | | signed chars in frameobject.c which can occur with opcodes > 127
* Test and fix fromkeys optional argument.Raymond Hettinger2007-03-211-2/+2
|
* Extend work on rev 52962 and 53830 eliminating redundant PyObject_Hash() ↵Raymond Hettinger2007-03-202-2/+36
| | | | calls and fixing set/dict interoperability.
* Patch #1462488: prevent a segfault in object_reduce_ex() by splittingŽiga Seilnacht2007-03-151-14/+47
| | | | | | the implementation for __reduce__ and __reduce_ex__ into two separate functions. Fixes bug #931877. (backport from rev. 54397)
* Patch #1680015: Don't modify __slots__ tuple if it contains an unicodeŽiga Seilnacht2007-03-141-16/+20
| | | | | | name. Remove a reference leak that happened if the name could not be converted to string. (backport from rev. 54378)
* Patch #1675981: remove unreachable code from type.__new__() method.Žiga Seilnacht2007-03-111-7/+5
| | | | | | __dict__ and __weakref__ are removed from the slots tuple earlier in the code, in the loop that mangles slot names. (backport from rev. 54270)
* Fix SF #1676971, Complex OverflowError has a typoNeal Norwitz2007-03-091-1/+1
|
* Patch #1638879: don't accept strings with embedded NUL bytes in long().Georg Brandl2007-03-061-1/+18
| | | | (backport from rev. 54173)
* Backport from Py3k branch: fix refleak in PyString_Format.Georg Brandl2007-02-261-1/+5
| | | | (backport from rev. 53935)
* Fixup set/dict interoperability.Raymond Hettinger2007-02-191-0/+11
|
* Extend work on revision 52962: Eliminate redundant calls to PyObject_Hash().Raymond Hettinger2007-02-192-7/+50
|
* Bug #1653736: Properly discard third argument to slot_nb_inplace_power.Martin v. Löwis2007-02-091-1/+7
|
* Bypass set specific optimizations for set and frozenset subclasses.Raymond Hettinger2007-02-081-7/+7
|
* Do not let overflows in enumerate() and count() pass silently.Raymond Hettinger2007-02-071-0/+6
|
* Silence compiler warningRaymond Hettinger2007-02-071-1/+1
|
* Bug #1575169: operator.isSequenceType() now returns False for subclasses of ↵Raymond Hettinger2007-02-071-0/+2
| | | | dict.
* SF #1615701: make d.update(m) honor __getitem__() and keys() in dict subclassesRaymond Hettinger2007-02-071-1/+1
|
* Bug #1648179: set.update() not recognizing __iter__ overrides in dict ↵Raymond Hettinger2007-02-011-4/+4
| | | | subclasses.
* If you created a weakref in an object's __del__ method to itself it wouldBrett Cannon2007-01-232-0/+14
| | | | | | | | segfault the interpreter during weakref clean up. Now any new weakrefs created after __del__ is run are removed silently. Fixes bug #1377858 and the weakref_in_del crasher for new-style classes. Classic classes are still affected.
* Backport trunk revision 53527:Thomas Wouters2007-01-231-0/+2
| | | | | | | | | | | | | SF patch #1630975: Fix crash when replacing sys.stdout in sitecustomize When running the interpreter in an environment that would cause it to set stdout/stderr/stdin's encoding, having a sitecustomize that would replace them with something other than PyFile objects would crash the interpreter. Fix it by simply ignoring the encoding-setting for non-files. This could do with a test, but I can think of no maintainable and portable way to test this bug, short of adding a sitecustomize.py to the buildsystem and have it always run with it (hmmm....)
* SF #1486663 -- Allow keyword args in subclasses of set() and frozenset().Raymond Hettinger2007-01-111-2/+2
|
* For sets with cyclical reprs, emit '...' instead of recursing.Raymond Hettinger2006-12-291-4/+24
|