| Commit message (Collapse) | Author | Age | Files | Lines | |
|---|---|---|---|---|---|
| * | use Py_LOCAL also for string and unicode objects | Fredrik Lundh | 2006-05-26 | 1 | -13/+1 |
| | | |||||
| * | needforspeed: use Py_ssize_t for the fastsearch counter and skip | Fredrik Lundh | 2006-05-26 | 1 | -1/+1 |
| | | | | | | length (thanks, neal!). and yes, I've verified that this doesn't slow things down ;-) | ||||
| * | needforspeed: use METH_O for argument handling, which made partition some | Fredrik Lundh | 2006-05-26 | 1 | -6/+2 |
| | | | | | | ~15% faster for the current tests (which is noticable faster than a corre- sponding find call). thanks to neal-who-never-sleeps for the tip. | ||||
| * | needforspeed: partition implementation, part two. | Fredrik Lundh | 2006-05-26 | 1 | -15/+15 |
| | | | | | feel free to improve the documentation and the docstrings. | ||||
| * | needforspeed: partition for 8-bit strings. for some simple tests, | Fredrik Lundh | 2006-05-25 | 1 | -5/+66 |
| | | | | | | | | | this is on par with a corresponding find, and nearly twice as fast as split(sep, 1) full tests, a unicode version, and documentation will follow to- morrow. | ||||
| * | squelch gcc4 darwin/x86 compiler warnings | Bob Ippolito | 2006-05-25 | 1 | -1/+1 |
| | | |||||
| * | needforspeed: use insert+reverse instead of append | Fredrik Lundh | 2006-05-25 | 1 | -16/+8 |
| | | |||||
| * | * eliminate warning by reverting tmp_s type to 'const char*' | Jack Diederich | 2006-05-25 | 1 | -1/+1 |
| | | |||||
| * | needforspeed: use fastsearch also for find/index and contains. the | Fredrik Lundh | 2006-05-25 | 1 | -1/+25 |
| | | | | | related tests are now about 10x faster. | ||||
| * | Added overflow test for adding two (very) large strings where the | Andrew Dalke | 2006-05-25 | 1 | -2/+7 |
| | | | | | | new string is over max Py_ssize_t. I have no way to test it on my box or any box I have access to. At least it doesn't break anything. | ||||
| * | Comment typo | Andrew M. Kuchling | 2006-05-25 | 1 | -1/+1 |
| | | |||||
| * | needforspeed: use "fastsearch" for count. this results in a 3x speedup | Fredrik Lundh | 2006-05-25 | 1 | -1/+122 |
| | | | | | for the related stringbench tests. | ||||
| * | Fixed problem identified by Georg. The special-case in-place code for replace | Andrew Dalke | 2006-05-25 | 1 | -2/+5 |
| | | | | | | | | | | | | made a copy of the string using PyString_FromStringAndSize(s, n) and modify the copied string in-place. However, 1 (and 0) character strings are shared from a cache. This cause "A".replace("A", "a") to change the cached version of "A" -- used by everyone. Now may the copy with NULL as the string and do the memcpy manually. I've added regression tests to check if this happens in the future. Perhaps there should be a PyString_Copy for this case? | ||||
| * | needforspeed: new replace implementation by Andrew Dalke. replace is | Fredrik Lundh | 2006-05-25 | 1 | -182/+605 |
| | | | | | | now about 3x faster on my machine, for the replace tests from string- bench. | ||||
| * | needforspeed: check for overflow in replace (from Andrew Dalke) | Fredrik Lundh | 2006-05-25 | 1 | -2/+21 |
| | | |||||
| * | needforspeed: _toupper/_tolower is a SUSv2 thing; fall back on ISO C | Fredrik Lundh | 2006-05-25 | 1 | -0/+9 |
| | | | | | versions if they're not defined. | ||||
| * | needforspeed: make new upper/lower work properly for single-character | Fredrik Lundh | 2006-05-25 | 1 | -4/+8 |
| | | | | | | strings too... (thanks to georg brandl for spotting the exact problem faster than anyone else) | ||||
| * | needforspeed: speed up upper and lower for 8-bit string objects. | Fredrik Lundh | 2006-05-25 | 1 | -22/+20 |
| | | | | | | | | (the unicode versions of these are still 2x faster on windows, though...) based on work by Andrew Dalke, with tweaks by yours truly. | ||||
| * | docstring tweaks: count counts non-overlapping substrings, not | Fredrik Lundh | 2006-05-22 | 1 | -3/+3 |
| | | | | | total number of occurences | ||||
| * | Teach PyString_FromFormat, PyErr_Format, and PyString_FromFormatV | Tim Peters | 2006-05-13 | 1 | -13/+22 |
| | | | | | | | | | | | | | about "%u", "%lu" and "%zu" formats. Since PyString_FromFormat and PyErr_Format have exactly the same rules (both inherited from PyString_FromFormatV), it would be good if someone with more LaTeX Fu changed one of them to just point to the other. Their docs were way out of synch before this patch, and I just did a mass copy+paste to repair that. Not a backport candidate (this is a new feature). | ||||
| * | Revert 43315: Printing of %zd must be signed. | Martin v. Löwis | 2006-05-13 | 1 | -2/+2 |
| | | |||||
| * | Py_ssize_t issue; repr()'ing a very large string would result in a teensy | Thomas Wouters | 2006-04-21 | 1 | -1/+1 |
| | | | | | string, because of a cast to int. | ||||
| * | Make s.replace() work with explicit counts exceeding 2Gb. | Thomas Wouters | 2006-04-19 | 1 | -2/+2 |
| | | |||||
| * | Use Py_ssize_t to hold the 'width' argument to the ljust, rjust, center and | Thomas Wouters | 2006-04-19 | 1 | -8/+8 |
| | | | | | | | zfill stringmethods, so they can create strings larger than 2Gb on 64bit systems (even win64.) The unicode versions of these methods already did this right. | ||||
| * | C++ compiler cleanup: bunch-o-casts, plus use of unsigned loop index var in ↵ | Skip Montanaro | 2006-04-18 | 1 | -1/+1 |
| | | | | | a couple places | ||||
| * | No need to cast a Py_ssize_t, use %z in PyErr_Format | Neal Norwitz | 2006-04-17 | 1 | -2/+2 |
| | | |||||
| * | Make Py_BuildValue, PyObject_CallFunction and | Martin v. Löwis | 2006-04-14 | 1 | -0/+1 |
| | | | | | PyObject_CallMethod aware of PY_SSIZE_T_CLEAN. | ||||
| * | Change more occurrences of maxsplit to Py_ssize_t. | Martin v. Löwis | 2006-04-13 | 1 | -4/+4 |
| | | |||||
| * | Change maxsplit types to Py_ssize_t. | Martin v. Löwis | 2006-04-13 | 1 | -4/+4 |
| | | |||||
| * | Replace most INT_MAX with PY_SSIZE_T_MAX. | Martin v. Löwis | 2006-04-13 | 1 | -11/+11 |
| | | |||||
| * | More low-hanging fruit. Still need to re-arrange some code (or find a better | Anthony Baxter | 2006-04-11 | 1 | -35/+35 |
| | | | | | | solution) in the same way as listobject.c got changed. Hoping for a better solution. | ||||
| * | Remove dead code (reported by HP compiler). | Neal Norwitz | 2006-04-06 | 1 | -8/+5 |
| | | | | | Can probably be backported if anyone cares. | ||||
| * | Remove unnecessary casts in type object initializers. | Georg Brandl | 2006-03-30 | 1 | -3/+3 |
| | | |||||
| * | Get rid of warnings on some platforms by using %u for a size_t. | Neal Norwitz | 2006-03-25 | 1 | -1/+1 |
| | | |||||
| * | Use macro versions instead of function versions when we already know the type. | Neal Norwitz | 2006-03-20 | 1 | -4/+5 |
| | | | | | | | | | This will hopefully get rid of some Coverity warnings, be a hint to developers, and be marginally faster. Some asserts were added when the type is currently known, but depends on values from another function. | ||||
| * | Introduced symbol PY_FORMAT_SIZE_T. See the new comments | Tim Peters | 2006-03-17 | 1 | -31/+22 |
| | | | | | | in pyport.h. Changed PyString_FromFormatV() to use it instead of inlining its own maze of #if'ery. | ||||
| * | Checking in the code for PEP 357. | Guido van Rossum | 2006-03-07 | 1 | -3/+6 |
| | | | | | | | This was mostly written by Travis Oliphant. I've inspected it all; Neal Norwitz and MvL have also looked at it (in an earlier incarnation). | ||||
| * | SF #1444030: Fix several potential defects found by Coverity. | Hye-Shik Chang | 2006-03-07 | 1 | -1/+1 |
| | | | | | (reviewed by Neal Norwitz) | ||||
| * | Change int to Py_ssize_t in several places. | Martin v. Löwis | 2006-03-07 | 1 | -4/+12 |
| | | | | | | Add (int) casts to silence compiler warnings. Raise Python exceptions for overflows. | ||||
| * | Revert backwards-incompatible const changes. | Martin v. Löwis | 2006-02-27 | 1 | -1/+1 |
| | | |||||
| * | Use Py_ssize_t in helper function between Py_ssize_t-using functions. | Thomas Wouters | 2006-02-16 | 1 | -2/+2 |
| | | |||||
| * | Use Py_ssize_t for counts and sizes. | Martin v. Löwis | 2006-02-16 | 1 | -5/+5 |
| | | | | | Convert Py_ssize_t using PyInt_FromSsize_t | ||||
| * | Support %zd in PyErr_Format and PyString_FromFormat. | Martin v. Löwis | 2006-02-16 | 1 | -0/+21 |
| | | |||||
| * | Merge ssize_t branch. | Martin v. Löwis | 2006-02-15 | 1 | -156/+157 |
| | | |||||
| * | Add const to several API functions that take char *. | Jeremy Hylton | 2005-12-10 | 1 | -1/+1 |
| | | | | | | | | | | | | | | | | | | | | In C++, it's an error to pass a string literal to a char* function without a const_cast(). Rather than require every C++ extension module to put a cast around string literals, fix the API to state the const-ness. I focused on parts of the API where people usually pass literals: PyArg_ParseTuple() and friends, Py_BuildValue(), PyMethodDef, the type slots, etc. Predictably, there were a large set of functions that needed to be fixed as a result of these changes. The most pervasive change was to make the keyword args list passed to PyArg_ParseTupleAndKewords() to be a const char *kwlist[]. One cast was required as a result of the changes: A type object mallocs the memory for its tp_doc slot and later frees it. PyTypeObject says that tp_doc is const char *; but if the type was created by type_new(), we know it is safe to cast to char *. | ||||
| * | Fix bug: | Michael W. Hudson | 2005-10-21 | 1 | -4/+0 |
| | | | | | | | | | [ 1327110 ] wrong TypeError traceback in generator expressions by removing the code that can stomp on the users' TypeError raised by the iterable argument to ''.join() -- PySequence_Fast (now?) gives a perfectly reasonable message itself. Also, a couple of tests. | ||||
| * | SF bug #1331563 ] string_subscript doesn't check for failed PyMem_Malloc. ↵ | Neal Norwitz | 2005-10-20 | 1 | -0/+2 |
| | | | | | Will backport | ||||
| * | Fix PyString_Format so that the "%s" format works again when Unicode is not | Georg Brandl | 2005-10-01 | 1 | -0/+2 |
| | | | | | enabled. | ||||
| * | Fix bug in last checkin (2.231). To match previous behavior, unicode | Neil Schemenauer | 2005-08-31 | 1 | -0/+5 |
| | | | | | | subclasses should be substituted as-is and not have tp_str called on them. | ||||
| * | Change the %s format specifier for str objects so that it returns a | Neil Schemenauer | 2005-08-12 | 1 | -8/+4 |
| | | | | | | unicode instance if the argument is not an instance of basestring and calling __str__ on the argument returns a unicode instance. | ||||
