]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
rewrote the pattern.sub and pattern.subn methods in C
authorFredrik Lundh <fredrik@pythonware.com>
Sun, 21 Oct 2001 16:47:57 +0000 (16:47 +0000)
committerFredrik Lundh <fredrik@pythonware.com>
Sun, 21 Oct 2001 16:47:57 +0000 (16:47 +0000)
commitbec95b9d8825b39cff46a8c645fa0eeb8409854e
tree11a28a4cc7b744dc07c72c52a89655fbf3868330
parent5b68ce3122a7663ca027a3e17e21d5d5561d09d9
rewrote the pattern.sub and pattern.subn methods in C

removed (conceptually flawed) getliteral helper; the new sub/subn code
uses a faster code path for literal replacement strings, but doesn't
(yet) look for literal patterns.

added STATE_OFFSET macro, and use it to convert state.start/ptr to
char indexes
Lib/sre.py
Modules/_sre.c