summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* __hash__ may now return long int; the final hashMartin v. Löwis2006-08-092-6/+7
| | | | | value is obtained by invoking hash on the long int. Fixes #1536021.
* memcmp() can return values other than -1, 0, and +1 but tp_compareThomas Heller2006-08-081-1/+1
| | | | must not.
* Remove "non-mapping" and "non-sequence" from TypeErrors raised byGeorg Brandl2006-08-081-2/+2
| | | | | | | PyMapping_Size and PySequence_Size. Because len() tries first sequence, then mapping size, it will always raise a "non-mapping object has no len" error which is confusing.
* Typo fixesAndrew M. Kuchling2006-08-042-2/+2
|
* Change fix for segfaulting property(), add a NEWS entry and a test.Georg Brandl2006-08-041-10/+12
|
* Fix bug caused by first decrefing, then increfing.Georg Brandl2006-08-041-5/+4
|
* SF patch #1534048 (bug #1531003): fix typo in error messageFred Drake2006-08-041-1/+1
|
* _PyWeakref_GetWeakrefCount() now returns a Py_ssize_t instead of long.Neal Norwitz2006-08-021-2/+2
|
* typo fixAndrew M. Kuchling2006-08-011-1/+1
|
* Whitespace normalizationNeal Norwitz2006-07-301-35/+32
|
* Bug #1515471: string.replace() accepts character buffers again.Neal Norwitz2006-07-301-71/+51
| | | | Pass the char* and size around rather than PyObject's.
* [Bug #1414697] Change docstring of set/frozenset types to specify that the ↵Andrew M. Kuchling2006-07-291-2/+2
| | | | contents are unique. Raymond, please feel free to edit or revert.
* Closure can't be NULL at this point since we know it's a tuple.Neal Norwitz2006-07-271-1/+1
| | | | Reported by Klocwork # 74.
* Move the initialization of size_a down below the check for a being NULL.Neal Norwitz2006-07-231-1/+2
| | | | Reported by Klocwork #106
* Handle allocation failures gracefully. Found with failmalloc.Neal Norwitz2006-07-212-0/+5
| | | | Many (all?) of these could be backported.
* Move the initialization of some pointers earlier. The problem isNeal Norwitz2006-07-211-1/+1
| | | | | that if we call Py_DECREF(frame) like we do if allocating locals fails, frame_dealloc() will try to use these bogus values and crash.
* Add some asserts that we got good params passedNeal Norwitz2006-07-211-0/+3
|
* otherset is known to be non-NULL based on checks before and DECREF after.Neal Norwitz2006-07-171-2/+2
| | | | | | DECREF otherset rather than XDECREF in error conditions too. Reported by Klockwork #154.
* Stop INCREFing name, then checking if it's NULL. name (f_name) should neverNeal Norwitz2006-07-171-3/+6
| | | | | | be NULL so assert it. Fix one place where we could have passed NULL. Reported by Klocwork #66.
* PyFunction_SetDefaults() is documented as taking None or a tuple.Neal Norwitz2006-07-161-2/+2
| | | | | | A NULL would crash the PyTuple_Check(). Now make NULL return a SystemError. Reported by Klocwork #73.
* Handle a NULL name properly.Neal Norwitz2006-07-161-3/+3
| | | | Reported by Klocwork #67
* Use sizeof(buffer) instead of duplicating the constants to ensure they won'tNeal Norwitz2006-07-161-7/+7
| | | | | | | | | be wrong. The real change is to pass (bufsz - 1) to PyOS_ascii_formatd and 1 to strncat. strncat copies n+1 bytes from src (not dest). Reported by Klocwork #58.
* a & b were dereffed above, so they are known to be valid pointers.Neal Norwitz2006-07-161-3/+2
| | | | | | z is known to be NULL, nothing to DECREF. Reported by Klockwork, #107.
* Fix uninitialized memory read reported by Valgrind when running doctest.Neal Norwitz2006-07-121-0/+1
| | | | This could happen if size == 0.
* Fix build problems with the platform SDK on windows. It is not sufficient ↵Kristján Valur Jónsson2006-07-032-4/+4
| | | | to test for the C compiler version when determining if we have the secure CRT from microsoft. Must test with an undocumented macro, __STDC_SECURE_LIB__ too.
* Put method-wrappers into trashcan. Fixes #927248.Martin v. Löwis2006-07-031-1/+3
|
* Another problem reported by Coverity. Backport candidate.Neal Norwitz2006-06-301-0/+2
|
* Fix refleakNeal Norwitz2006-06-231-1/+3
|
* Fix for an obscure bug introduced by revs 46806 and 46808, with a test.Armin Rigo2006-06-212-11/+10
| | | | | | | | | | | | | | The problem of checking too eagerly for recursive calls is the following: if a RuntimeError is caused by recursion, and if code needs to normalize it immediately (as in the 2nd test), then PyErr_NormalizeException() needs a call to the RuntimeError class to instantiate it, and this hits the recursion limit again... causing PyErr_NormalizeException() to never finish. Moved this particular recursion check to slot_tp_call(), which is not involved in instantiating built-in exceptions. Backport candidate.
* Use Py_ssize_tNeal Norwitz2006-06-191-22/+22
|
* Patch #1507676: improve exception messages in abstract.c, object.c and ↵Georg Brandl2006-06-183-64/+81
| | | | typeobject.c.
* Patch #1455898: Incremental mode for "mbcs" codec.Martin v. Löwis2006-06-141-39/+175
|
* If a classic class defined a __coerce__() method that just returned its twoBrett Cannon2006-06-131-0/+3
| | | | | | | | arguments in reverse, the interpreter would infinitely recourse trying to get a coercion that worked. So put in a recursion check after a coercion is made and the next call to attempt to use the coerced values. Fixes bug #992017 and closes crashers/coerce.py .
* Initialize the type object so pychecker can't crash the interpreter.Neal Norwitz2006-06-131-0/+2
|
* Fix the CRT argument error handling for VisualStudio .NET 2005. Install a ↵Kristján Valur Jónsson2006-06-122-1/+38
| | | | | | CRT error handler and disable the assertion for debug builds. This causes CRT to set errno to EINVAL. This update fixes crash cases in the test suite where the default CRT error handler would cause process exit.
* Get rid of f_restricted too. Doc the other 4 ints that were already removedNeal Norwitz2006-06-121-2/+7
| | | | at the NeedForSpeed sprint.
* Don't leak the list object if there's an error allocating the item storage. ↵Neal Norwitz2006-06-121-1/+3
| | | | Backport candidate
* f_code can't be NULL based on Frame_New and other code that derefs it.Neal Norwitz2006-06-111-2/+2
| | | | So there doesn't seem to be much point to checking here.
* Update doc to make it agree with code.Neal Norwitz2006-06-111-10/+4
| | | | Bottom factor out some common code.
* Suppress warning on MacOSX about possible use before set of proc.Skip Montanaro2006-06-101-1/+1
|
* Patch #1495999: Part two of Windows CE changes.Martin v. Löwis2006-06-101-2/+2
| | | | | | - update header checks, using autoconf - provide dummies for getenv, environ, and GetVersion - adjust MSC_VER check in socketmodule.c
* SF bug #1503294.Armin Rigo2006-06-101-1/+1
| | | | PyThreadState_GET() complains if the tstate is NULL, but only in debug mode.
* Apply perky's fix for #1503157: "/".join([u"", u""]) raising OverflowError.Georg Brandl2006-06-102-4/+4
| | | | Also improve error message on overflow.
* Fix bug introduced in rev. 46806 by not having variable declaration at the ↵Brett Cannon2006-06-091-2/+4
| | | | top of a block.
* An object with __call__ as an attribute, when called, will have that ↵Brett Cannon2006-06-091-0/+8
| | | | | | attribute checked for __call__ itself, and will continue to look until it finds an object without the attribute. This can lead to an infinite recursion. Closes bug #532646, again. Will be backported.
* RFE #1491485: str/unicode.endswith()/startswith() now accept a tuple as ↵Georg Brandl2006-06-092-80/+140
| | | | first argument.
* Fix inconsistency in naming within an enum.Brett Cannon2006-06-091-12/+12
|
* Buffer objects would return the read or write buffer for a wrapped object whenBrett Cannon2006-06-081-22/+71
| | | | | | | | | the char buffer was requested. Now it actually returns the char buffer if available or raises a TypeError if it isn't (as is raised for the other buffer types if they are not present but requested). Not a backport candidate since it does change semantics of the buffer object (although it could be argued this is enough of a bug to bother backporting).
* Bug #1502805: don't alias file.__exit__ to file.close since theGeorg Brandl2006-06-081-1/+18
| | | | latter can return something that's true.
* (arre, arigo) SF bug #1350060Armin Rigo2006-06-082-10/+33
| | | | | | Give a consistent behavior for comparison and hashing of method objects (both user- and built-in methods). Now compares the 'self' recursively. The hash was already asking for the hash of 'self'.