summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* [ 1497053 ] Let dicts propagate the exceptions in user __eq__().Armin Rigo2006-06-011-50/+107
| | | | [ 1456209 ] dictresize() vulnerability ( <- backport candidate ).
* Correctly allocate complex types with tp_alloc. (bug #1498638)Georg Brandl2006-06-011-2/+2
|
* Correctly unpickle 2.4 exceptions via __setstate__ (patch #1498571)Georg Brandl2006-06-011-0/+24
|
* Remove ; at end of macro. There was a compiler recently that warnedNeal Norwitz2006-06-011-1/+1
| | | | | about extra semi-colons. It may have been the HP C compiler. This file will trigger a bunch of those warnings now.
* changed count to return 0 for slices outside the source stringFredrik Lundh2006-05-301-1/+1
|
* changed find/rfind to return -1 for matches outside the source stringFredrik Lundh2006-05-301-10/+11
|
* PyLong_FromString(): Continued fraction analysis (explained inTim Peters2006-05-301-3/+74
| | | | | | | | | | | | a new comment) suggests there are almost certainly large input integers in all non-binary input bases for which one Python digit too few is initally allocated to hold the final result. Instead of assert-failing when that happens, allocate more space. Alas, I estimate it would take a few days to find a specific such case, so this isn't backed up by a new test (not to mention that such a case may take hours to run, since conversion time is quadratic in the number of digits, and preliminary attempts suggested that the smallest such inputs contain at least a million digits).
* Do the check for no keyword arguments in __init__ so thatGeorg Brandl2006-05-301-3/+3
| | | | subclasses of Exception can be supplied keyword args
* Disallow keyword args for exceptions.Georg Brandl2006-05-301-0/+3
|
* Add a test case for exception pickling. args is never NULL.Georg Brandl2006-05-301-11/+8
|
* Restore exception pickle support. #1497319.Georg Brandl2006-05-301-1/+11
|
* dict_print(): So that Neal & I don't spend the rest ofTim Peters2006-05-301-4/+5
| | | | | | our lives taking turns rewriting code that works ;-), get rid of casting illusions by declaring a new variable with the obvious type.
* dict_print(): Explicitly narrow the return valueTim Peters2006-05-301-1/+1
| | | | from a (possibly) wider variable.
* No DOWNCAST is required since sizeof(Py_ssize_t) >= sizeof(int) and ↵Neal Norwitz2006-05-301-1/+1
| | | | Py_ReprEntr returns an int
* Use Py_SAFE_DOWNCAST for safety. Fix format strings. Remove 2 more stray | ↵Neal Norwitz2006-05-301-6/+6
| | | | in comment
* Remove stray | in commentNeal Norwitz2006-05-301-1/+1
|
* Convert relevant dict internals to Py_ssize_t.Tim Peters2006-05-301-43/+55
| | | | | | I don't have a box with nearly enough RAM, or an OS, that could get close to tickling this, though (requires a dict w/ at least 2**31 entries).
* fixed "abc".count("", 100) == -96 error (hopefully, nobody's relying onFredrik Lundh2006-05-291-1/+4
| | | | the current behaviour ;-)
* Make use of METH_O and METH_NOARGS where possible.Georg Brandl2006-05-291-1/+1
| | | | Use Py_UnpackTuple instead of PyArg_ParseTuple where possible.
* Correct some value converting strangenesses.Georg Brandl2006-05-292-3/+3
|
* Fix refleak in socketmodule. Replace bogus Py_BuildValue calls.Georg Brandl2006-05-291-0/+1
| | | | Fix refleak in exceptions.
* Make last patch valid C89 so Windows compilers can deal with it.Thomas Wouters2006-05-281-1/+2
|
* use the UnicodeError traversal and clearing functions in UnicodeErrorMichael W. Hudson2006-05-281-4/+4
| | | | subclasses.
* Fix refleaks in UnicodeError get and set methods.Georg Brandl2006-05-281-45/+56
|
* Quality control, meet exceptions.c, round two.Michael W. Hudson2006-05-281-222/+165
| | | | | | | | | | | | | | | | Make some functions that should have been static static. Fix a bunch of refleaks by fixing the definition of MiddlingExtendsException. Remove all the __new__ implementations apart from BaseException_new. Rewrite most code that needs it to cope with NULL fields (such code could get excercised anyway, the __new__-removal just makes it more likely). This involved editing the code for WindowsError, which I can't test. This fixes all the refleaks in at least the start of a regrtest -R :: run.
* Quality control, meet exceptions.c.Michael W. Hudson2006-05-281-128/+105
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix a number of problems with the need for speed code: One is doing this sort of thing: Py_DECREF(self->field); self->field = newval; Py_INCREF(self->field); without being very sure that self->field doesn't start with a value that has a __del__, because that almost certainly can lead to segfaults. As self->args is constrained to be an exact tuple we may as well exploit this fact consistently. This leads to quite a lot of simplification (and, hey, probably better performance). Add some error checking in places lacking it. Fix some rather strange indentation in the Unicode code. Delete some trailing whitespace. More to come, I haven't fixed all the reference leaks yet...
* needforspeed: added Py_MEMCPY macro (currently tuned for Visual C only),Fredrik Lundh2006-05-281-37/+37
| | | | | and use it for string copy operations. this gives a 20% speedup on some string benchmarks.
* move semicolonsRichard Jones2006-05-271-53/+51
|
* doc string additions and tweaksRichard Jones2006-05-271-8/+21
|
* needforspeed: stringlib refactoring: use find_slice for stringobjectFredrik Lundh2006-05-271-12/+15
|
* needforspeed: stringlib refactoring: changed find_obj to find_slice,Fredrik Lundh2006-05-272-36/+69
| | | | to enable use from stringobject
* needforspeed: replace improvements, changed to Py_LOCAL_INLINEFredrik Lundh2006-05-276-41/+55
| | | | where appropriate
* Remove spurious semicolons after macro invocations.Georg Brandl2006-05-271-42/+42
|
* cleanup - removed trailing whitespaceAndrew Dalke2006-05-271-1/+1
|
* Conversion of exceptions over from faked-up classes to new-style C types.Richard Jones2006-05-271-0/+2130
|
* Revert bogus change committed in 46432 to this file.Martin v. Löwis2006-05-271-1/+0
|
* fixed typoAndrew Dalke2006-05-271-1/+1
|
* needforspeed: more stringlib refactoringFredrik Lundh2006-05-274-147/+161
|
* Patch 1494554: Update numeric properties to Unicode 4.1.Martin v. Löwis2006-05-272-6/+328
|
* Fix Coverity warnings.Neal Norwitz2006-05-272-7/+2
| | | | | - Check the correct variable (str_obj, not str) for NULL - sep_len was already verified it wasn't 0
* Added description of why splitlines doesn't use the prealloc strategyAndrew Dalke2006-05-261-0/+8
|
* Added limits to the replace code so it does not count all of the matchingAndrew Dalke2006-05-261-22/+19
| | | | patterns in a string, only the number needed by the max limit.
* Simplify calling.Georg Brandl2006-05-261-8/+2
|
* Comment typoAndrew M. Kuchling2006-05-261-1/+1
|
* needforspeed: stringlib refactoring: use stringlib/find for string findFredrik Lundh2006-05-263-30/+25
|
* needforspeed: use a macro to fix slice indexesFredrik Lundh2006-05-261-52/+18
|
* needforspeed: stringlib refactoring: use stringlib/find for unicodeFredrik Lundh2006-05-261-14/+36
| | | | find
* needforspeed: stringlib refactoring, continued. added count andFredrik Lundh2006-05-265-53/+132
| | | | find helpers; updated unicodeobject to use stringlib_count
* substring split now uses /F's fast string matching algorithm.Andrew Dalke2006-05-261-40/+57
| | | | | | | | | | (If compiled without FAST search support, changed the pre-memcmp test to check the last character as well as the first. This gave a 25% speedup for my test case.) Rewrote the split algorithms so they stop when maxsplit gets to 0. Previously they did a string match first then checked if the maxsplit was reached. The new way prevents a needless string search.
* needspeed: rpartition documentation, tests, and a bug fixes.Fredrik Lundh2006-05-261-2/+2
| | | | feel free to add more tests and improve the documentation.