summaryrefslogtreecommitdiffstats
path: root/Modules/regexmodule.c
Commit message (Collapse)AuthorAgeFilesLines
* Apply two changes, systematically:Guido van Rossum1997-10-011-2/+2
| | | | | | | | | | | | | | | | | (1) Use PyErr_NewException("module.class", NULL, NULL) to create the exception object. (2) Remove all calls to Py_FatalError(); instead, return or ignore the errors -- the import code now checks PyErr_Occurred() after calling a module's init function, so it's no longer a fatal error for the initialization to fail. Also did some small cleanups, e.g. removed unnecessary test for "already initialized" from initfpectl(), and unified initposix()/initnt(). I haven't checked this very thoroughly, so while the changes are pretty trivial -- beware of untested code!
* Change [_Py_]re_compile_pattern() to return a char*.Guido van Rossum1997-09-031-1/+1
| | | | | Since it only returns an error message (or NULL) there's no reason for it to be unsigned char *, and various compilers like this better.
* Casts by Jack to shut up the Mac compiler.Guido van Rossum1997-08-181-5/+5
|
* Use _Py_re_match/search instead of re_match/search; these may becomeGuido van Rossum1997-08-141-2/+3
| | | | different in a future version.
* 1.5a3 prerelease 1 from AMKGuido van Rossum1997-08-131-4/+8
|
* Fix big ineficciency in regobj.search/match (introduced by Barry in anGuido van Rossum1997-05-121-10/+12
| | | | | | | | otherwise laudible attempt to rationalize the argument parsing): it would save a copy of the original string instead of a reference to it. Go back to saving a reference, but keep the "s#" format (using a hack that involves two argument parsing steps, first using "O", then using "s#").
* regex_get_syntax(): New module function exported to Python.Barry Warsaw1997-02-181-0/+12
|
* Nailed a couple of memory leaks, caught by Purify.Barry Warsaw1997-01-091-1/+6
|
* Several changes. Test program to follow.Barry Warsaw1996-12-201-162/+267
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Where optional arguments were being used, converted to PyArg_ParseTuple() style instead of nested PyArg_Parse() style. - Check for and handle many potential error conditions that were never being tested. - internal reg_* functions renamed to regobj_* (makes it easier to figure out which are global regex functions and which are for regex objects). - reg_group (now regobj_group) was quite extensively reworked. it no longer recurses to do its job (by factoring core functionality into a separate function that knows about string and integer indexes). - some minor formatting fixes. - regex_set_syntax() now invalidates the cache. Without this change (in the example below), the second search would produce different output depending on whether the first search were performed or not (since performing the first search would cache the compiled object with RE_SYNTAX_EMACS, causing the second test to unexpectedly fail). regex.search('(a+)|(b+)', 'cdb') prev = regex.set_syntax(RE_SYNTAX_AWK) regex.search('(a+)|(b+)', 'cdb')
* Keep gcc -Wall happy.Guido van Rossum1996-12-051-0/+2
|
* New permission notice, includes CNRI.Guido van Rossum1996-10-251-13/+20
|
* Fix case where you start a new group immediately after a label.Guido van Rossum1996-10-231-1/+1
| | | | Thanks to Ka-Ping Yee.
* Speedup of makeresult() by keeping a filler of (-1, -1) around.Guido van Rossum1996-10-081-12/+25
|
* Declare initregex() as returning void, as it should be.Guido van Rossum1996-08-191-0/+1
|
* Converted to new style names by Skip MontanaroGuido van Rossum1996-07-241-192/+190
|
* Avoid core dump on symcomp("").Guido van Rossum1996-06-111-1/+5
|
* explicitly init flags in methodlistsGuido van Rossum1995-02-191-5/+5
|
* use Py_CHARMASKGuido van Rossum1995-02-101-2/+2
|
* mem leakGuido van Rossum1995-01-261-0/+1
|
* Added 1995 to copyright message.Guido van Rossum1995-01-041-2/+2
| | | | | Setup.in: clarified Tk comments somewhat. structmodule.c: use memcpy() instead of double precision assignment.
* Merge alpha100 branch back to main trunkGuido van Rossum1994-08-011-19/+191
|
* Extensive changes to regex module (group(), casefold, etc.)Guido van Rossum1993-02-231-12/+46
|
* * regexmodule.c: added use of translation table, substring() method.Guido van Rossum1993-02-211-38/+117
|
* Improve check for offset out of rangeGuido van Rossum1992-09-031-4/+8
|
* Remove redundant varsGuido van Rossum1992-03-271-2/+0
|
* Fix range error (doc and impl of re_search disagreed!)Guido van Rossum1992-01-271-29/+32
| | | | | Use getargs() function. Drop re_string from re object.
* Make "range" one smaller (discrepancy between doc and source for regex.c!).Guido van Rossum1992-01-261-1/+1
|
* Use Tatu Ylonen's copyleft-free reimplementation ofGuido van Rossum1992-01-191-2/+3
| | | | GNU regular expressions
* 'regs' is a read-only data member, not a function.Guido van Rossum1992-01-011-14/+8
|
* Initial revisionGuido van Rossum1991-12-301-0/+306