Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | changed count to return 0 for slices outside the source string | Fredrik Lundh | 2006-05-30 | 1 | -1/+1 |
| | |||||
* | changed find/rfind to return -1 for matches outside the source string | Fredrik Lundh | 2006-05-30 | 1 | -10/+11 |
| | |||||
* | PyLong_FromString(): Continued fraction analysis (explained in | Tim Peters | 2006-05-30 | 1 | -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 that | Georg Brandl | 2006-05-30 | 1 | -3/+3 |
| | | | | subclasses of Exception can be supplied keyword args | ||||
* | Disallow keyword args for exceptions. | Georg Brandl | 2006-05-30 | 1 | -0/+3 |
| | |||||
* | Add a test case for exception pickling. args is never NULL. | Georg Brandl | 2006-05-30 | 1 | -11/+8 |
| | |||||
* | Restore exception pickle support. #1497319. | Georg Brandl | 2006-05-30 | 1 | -1/+11 |
| | |||||
* | dict_print(): So that Neal & I don't spend the rest of | Tim Peters | 2006-05-30 | 1 | -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 value | Tim Peters | 2006-05-30 | 1 | -1/+1 |
| | | | | from a (possibly) wider variable. | ||||
* | No DOWNCAST is required since sizeof(Py_ssize_t) >= sizeof(int) and ↵ | Neal Norwitz | 2006-05-30 | 1 | -1/+1 |
| | | | | Py_ReprEntr returns an int | ||||
* | Use Py_SAFE_DOWNCAST for safety. Fix format strings. Remove 2 more stray | ↵ | Neal Norwitz | 2006-05-30 | 1 | -6/+6 |
| | | | | in comment | ||||
* | Remove stray | in comment | Neal Norwitz | 2006-05-30 | 1 | -1/+1 |
| | |||||
* | Convert relevant dict internals to Py_ssize_t. | Tim Peters | 2006-05-30 | 1 | -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 on | Fredrik Lundh | 2006-05-29 | 1 | -1/+4 |
| | | | | the current behaviour ;-) | ||||
* | Make use of METH_O and METH_NOARGS where possible. | Georg Brandl | 2006-05-29 | 1 | -1/+1 |
| | | | | Use Py_UnpackTuple instead of PyArg_ParseTuple where possible. | ||||
* | Correct some value converting strangenesses. | Georg Brandl | 2006-05-29 | 2 | -3/+3 |
| | |||||
* | Fix refleak in socketmodule. Replace bogus Py_BuildValue calls. | Georg Brandl | 2006-05-29 | 1 | -0/+1 |
| | | | | Fix refleak in exceptions. | ||||
* | Make last patch valid C89 so Windows compilers can deal with it. | Thomas Wouters | 2006-05-28 | 1 | -1/+2 |
| | |||||
* | use the UnicodeError traversal and clearing functions in UnicodeError | Michael W. Hudson | 2006-05-28 | 1 | -4/+4 |
| | | | | subclasses. | ||||
* | Fix refleaks in UnicodeError get and set methods. | Georg Brandl | 2006-05-28 | 1 | -45/+56 |
| | |||||
* | Quality control, meet exceptions.c, round two. | Michael W. Hudson | 2006-05-28 | 1 | -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. Hudson | 2006-05-28 | 1 | -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 Lundh | 2006-05-28 | 1 | -37/+37 |
| | | | | | and use it for string copy operations. this gives a 20% speedup on some string benchmarks. | ||||
* | move semicolons | Richard Jones | 2006-05-27 | 1 | -53/+51 |
| | |||||
* | doc string additions and tweaks | Richard Jones | 2006-05-27 | 1 | -8/+21 |
| | |||||
* | needforspeed: stringlib refactoring: use find_slice for stringobject | Fredrik Lundh | 2006-05-27 | 1 | -12/+15 |
| | |||||
* | needforspeed: stringlib refactoring: changed find_obj to find_slice, | Fredrik Lundh | 2006-05-27 | 2 | -36/+69 |
| | | | | to enable use from stringobject | ||||
* | needforspeed: replace improvements, changed to Py_LOCAL_INLINE | Fredrik Lundh | 2006-05-27 | 6 | -41/+55 |
| | | | | where appropriate | ||||
* | Remove spurious semicolons after macro invocations. | Georg Brandl | 2006-05-27 | 1 | -42/+42 |
| | |||||
* | cleanup - removed trailing whitespace | Andrew Dalke | 2006-05-27 | 1 | -1/+1 |
| | |||||
* | Conversion of exceptions over from faked-up classes to new-style C types. | Richard Jones | 2006-05-27 | 1 | -0/+2130 |
| | |||||
* | Revert bogus change committed in 46432 to this file. | Martin v. Löwis | 2006-05-27 | 1 | -1/+0 |
| | |||||
* | fixed typo | Andrew Dalke | 2006-05-27 | 1 | -1/+1 |
| | |||||
* | needforspeed: more stringlib refactoring | Fredrik Lundh | 2006-05-27 | 4 | -147/+161 |
| | |||||
* | Patch 1494554: Update numeric properties to Unicode 4.1. | Martin v. Löwis | 2006-05-27 | 2 | -6/+328 |
| | |||||
* | Fix Coverity warnings. | Neal Norwitz | 2006-05-27 | 2 | -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 strategy | Andrew Dalke | 2006-05-26 | 1 | -0/+8 |
| | |||||
* | Added limits to the replace code so it does not count all of the matching | Andrew Dalke | 2006-05-26 | 1 | -22/+19 |
| | | | | patterns in a string, only the number needed by the max limit. | ||||
* | Simplify calling. | Georg Brandl | 2006-05-26 | 1 | -8/+2 |
| | |||||
* | Comment typo | Andrew M. Kuchling | 2006-05-26 | 1 | -1/+1 |
| | |||||
* | needforspeed: stringlib refactoring: use stringlib/find for string find | Fredrik Lundh | 2006-05-26 | 3 | -30/+25 |
| | |||||
* | needforspeed: use a macro to fix slice indexes | Fredrik Lundh | 2006-05-26 | 1 | -52/+18 |
| | |||||
* | needforspeed: stringlib refactoring: use stringlib/find for unicode | Fredrik Lundh | 2006-05-26 | 1 | -14/+36 |
| | | | | find | ||||
* | needforspeed: stringlib refactoring, continued. added count and | Fredrik Lundh | 2006-05-26 | 5 | -53/+132 |
| | | | | find helpers; updated unicodeobject to use stringlib_count | ||||
* | substring split now uses /F's fast string matching algorithm. | Andrew Dalke | 2006-05-26 | 1 | -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 Lundh | 2006-05-26 | 1 | -2/+2 |
| | | | | feel free to add more tests and improve the documentation. | ||||
* | needforspeed: added rpartition implementation | Fredrik Lundh | 2006-05-26 | 4 | -1/+154 |
| | |||||
* | removed unnecessary include | Fredrik Lundh | 2006-05-26 | 1 | -2/+0 |
| | |||||
* | needforspeed: remove remaining USE_FAST macros; if fastsearch was | Fredrik Lundh | 2006-05-26 | 1 | -67/+2 |
| | | | | broken, someone would have noticed by now ;-) | ||||
* | needforspeed: cleanup | Fredrik Lundh | 2006-05-26 | 1 | -4/+8 |
| |