summaryrefslogtreecommitdiffstats
path: root/Modules/stropmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* REMOVED all CWI, CNRI and BeOpen copyright markings.Guido van Rossum2000-09-011-9/+0
| | | | This should match the situation in the 1.6b1 tree.
* Do the absolute minimal amount of modifications to eradicateBarry Warsaw2000-09-011-3/+0
| | | | | | | | | | | | | | | Py_FatalError() from module initialization functions. The importing mechanism already checks for PyErr_Occurred() after module importation and it Does The Right Thing. Unfortunately, the following either were not compiled or tested by the regression suite, due to issues with my development platform: almodule.c cdmodule.c mpzmodule.c puremodule.c timingmodule.c
* Use METH_OLDARGS instead of numeric constant 0 in method def. tablesAndrew M. Kuchling2000-08-031-7/+14
|
* Use METH_VARARGS instead of numeric constant 1 in method def. tablesAndrew M. Kuchling2000-08-031-14/+28
|
* Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters2000-07-211-1/+1
| | | | | | | | | | | | | | | | | | and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
* Spelling fixes supplied by Rob W. W. Hooft. All these are fixes in eitherThomas Wouters2000-07-161-3/+3
| | | | | | | | | | comments, docstrings or error messages. I fixed two minor things in test_winreg.py ("didn't" -> "Didn't" and "Didnt" -> "Didn't"). There is a minor style issue involved: Guido seems to have preferred English grammar (behaviour, honour) in a couple places. This patch changes that to American, which is the more prominent style in the source. I prefer English myself, so if English is preferred, I'd be happy to supply a patch myself ;)
* replace PyXXX_Length calls with PyXXX_Size callsJeremy Hylton2000-07-121-1/+1
|
* ANSI-ficationPeter Schneider-Kamp2000-07-101-84/+24
|
* Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters2000-07-091-1/+1
|
* Change copyright notice - 2nd try.Guido van Rossum2000-06-301-6/+0
|
* Change copyright notice.Guido van Rossum2000-06-301-22/+7
|
* Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum2000-05-031-2/+2
| | | | | | | | | | For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
* On 17-Mar-2000, Marc-Andre Lemburg said:Barry Warsaw2000-03-201-1/+1
| | | | | | | | | | | | | Attached you find an update of the Unicode implementation. The patch is against the current CVS version. I would appreciate if someone with CVS checkin permissions could check the changes in. The patch contains all bugs and patches sent this week and also fixes a leak in the codecs code and a bug in the free list code for Unicode objects (which only shows up when compiling Python with Py_DEBUG; thanks to MarkH for spotting this one).
* Massive patch by Skip Montanaro to add ":name" to as manyGuido van Rossum2000-02-291-12/+12
| | | | PyArg_ParseTuple() format string arguments as possible.
* split() docstring: Made signature and description for the firstFred Drake1999-11-041-3/+3
| | | | | parameter match. Error pointed out by François Pinard <pinard@iro.umontreal.ca> on c.l.py.
* In atoi(), don't use isxdigit() to test whether the last characterGuido van Rossum1999-02-221-1/+1
| | | | | | converted was a "digit" -- use isalnum(). This test is there only to guard against "+" or "-" being interpreted as a valid int literal. Reported by Takahiro Nakayama.
* expandtabs__doc__: blank line which was not terminated with \n\ causedBarry Warsaw1999-01-261-1/+0
| | | | the SunPro C compiler to choke. Removed this redundant line.
* A gift from Fredrik Lundh: fast C implementation of expandtabs().Guido van Rossum1999-01-251-0/+75
| | | | | I've reformatted it, added a few comments, a test for tabsize <= 0, and used the AS_STRING macro.
* Remove prototypes for PyOS_strto[u]l -- Chris Herborth.Guido van Rossum1998-12-101-3/+0
|
* Add DL_EXPORT() to all modules that could possibly be usedGuido van Rossum1998-12-041-1/+1
| | | | on BeOS or Windows.
* Add a missing DECREF in an error exit. Submitted by Jonathan Giddy.Guido van Rossum1998-10-191-0/+1
|
* Use the t# format where appropriate. Greg Stein.Guido van Rossum1998-10-081-13/+13
|
* Make gcc -Wall happy.Guido van Rossum1998-10-071-1/+1
|
* Andrew Dalke's implementation of string.count().Guido van Rossum1998-10-061-0/+47
|
* Better error messages when raising ValueError for int literals. (TheGuido van Rossum1998-08-041-8/+3
| | | | | previous version of this code would not show the offending input, even though there was code that attempted this.)
* Make sure that at least one digit has been consumed in atoi().Guido van Rossum1998-07-251-0/+4
|
* Make sure that no use of a function pointer gotten from aGuido van Rossum1998-05-221-3/+5
| | | | | tp_as_sequence or tp_as_mapping structure is made without checking it for NULL first.
* strop_replace(): balk if the pattern string is empty.Guido van Rossum1998-05-141-0/+4
|
* Check for boundary errors in [r]find -- find("x", "", 2) should return -1.Guido van Rossum1998-03-241-2/+2
|
* Forgot to return NULL in joinfields() when a type error was detectedGuido van Rossum1998-02-061-1/+3
| | | | in one of the sequence items.
* Oops, big glitch. Charles had put a 1 in the column for argument listGuido van Rossum1997-12-301-8/+8
| | | | | | | | type for all functions. However many function call PyArg_Parse() and need a 0. This is so that when they didn't change anything, the can do Py_INCREF(args); return args. Reverted this back. For atof(), there's no reason not to use PyArg_ParseTuple(), so I changed the code (atoi and atol already used that).
* Oops, the last checkin left a blank line in a string literal.Guido van Rossum1997-12-301-1/+1
|
* Minor editing corrections.Guido van Rossum1997-12-291-5/+6
|
* Added doc string, provided by Charles Waldman (with some reformattingGuido van Rossum1997-12-291-29/+162
| | | | and a little editing my me).
* split_whitespace(): Make sure delimiter is stripped from the beginningBarry Warsaw1997-12-021-1/+4
| | | | | of the remainder item (last item in list) when maxsplit is < the number of occurrences.
* mymemreplace(), strop_replace(): Add support for optional 4th argumentBarry Warsaw1997-11-291-4/+12
| | | | | | | | maxsplit which is implemented in string.py but wasn't here. The reference manual doesn't define what happens when maxsplit is negative or larger than the number of occurrences, but in either case, I implemented this as all get replaced. Default value is zero which replaces all occurrences.
* Keep gcc -Wall happy.Guido van Rossum1997-04-291-1/+1
|
* Added replace() implementation by Perry Stoll (debugged and reformatted by me).Guido van Rossum1997-04-021-1/+167
|
* Add optional 4th argument to [r]find and [r]index (end of slice).Guido van Rossum1997-03-141-9/+27
|
* Changes for Lee Busby's SIGFPE patch set.Guido van Rossum1997-02-141-0/+2
| | | | | Two new modules fpectl and fpetest. Surround various and sundry f.p. operations with PyFPE_*_PROTECT macros.
* New strop_joinfields implementation, highly optimized for Lists. AllBarry Warsaw1997-01-061-60/+82
| | | | | | other sequences use the Sequence protocol from the abstract API. The algorithm has changed so that only one pass through the sequences are made.
* Rewrote translate() as follows:Guido van Rossum1997-01-061-28/+52
| | | | | | | | | | | | - 'delete' is a C++ keyword; use 'del_table' instead - apply Py_CHARMASK() to del_table[i] before using it as an index *** this fixes a bug that was just reported on the list *** - if the translation didn't make any changes, INCREF and return the original string - when del_table is empty or omitted, don't copy the translation table to a table of ints (should be a bit faster) Rewrote maketrans() to avoid copying the table (2-3% faster).
* strop_upper(), strop_lower(): shared code version caused to much of aBarry Warsaw1997-01-031-27/+65
| | | | | | | performance hit. Urg. Reverted. strop_joinfields(): re-instate optimizations for lists and tuples, but support arbitrary other kinds of sequences as well.
* Several changes:Barry Warsaw1997-01-031-142/+106
| | | | | | | | | | | | | | | | | | | | | | | - split_whitespace(): slightly better memory ref handling when errors occur. - strop_joinfields(): First argument can now be any sequence-protocol conformant object. - strop_find(), strop_rfind(): Use PyArg_ParseTuple for optional arguments - strop_lower(), strop_upper(): Factor logic into a common function do_casechange(). - strop_atoi(), strop_atol(): Use PyArg_ParseTuple. - strop_maketrans(): arguments used to be optional, although the documentation doesn't reflect this. Make the source conform to the docs. Arguments are required, but two empty strings will return the identity translation table. - General pass fixing up formatting, and checking for return values.
* Greatly renamed.Barry Warsaw1996-12-091-178/+181
|
* Keep gcc -Wall happy.Guido van Rossum1996-12-051-3/+3
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* Replace all uses of strncmp (in split, find, rfind) with memcmp, soGuido van Rossum1996-10-041-3/+3
| | | | | embedded \0 in the delimiter is handled properly. Thanks to Sjoerd for suggesting this.
* Add text of argument to errors for atoi(), atol(), atof().Guido van Rossum1996-09-111-5/+25
|
* Raise ValueError on empty string passed into atoi(), atol(), atof().Guido van Rossum1996-08-211-0/+12
|