diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2013-10-26 07:45:48 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2013-10-26 07:45:48 (GMT) |
commit | 9eabac68a30428704754f7cf2b28a61e94e9d654 (patch) | |
tree | 06cd19f985bab5d88580de7ba7138c84c2e9412e /Modules/sre.h | |
parent | ffb58e96f10f9f8dfafd561f370dc5859480cd9b (diff) | |
download | cpython-9eabac68a30428704754f7cf2b28a61e94e9d654.zip cpython-9eabac68a30428704754f7cf2b28a61e94e9d654.tar.gz cpython-9eabac68a30428704754f7cf2b28a61e94e9d654.tar.bz2 |
Issue #18685: Restore re performance to pre-PEP 393 levels.
Diffstat (limited to 'Modules/sre.h')
-rw-r--r-- | Modules/sre.h | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Modules/sre.h b/Modules/sre.h index 0a8f0cf..42fe28d 100644 --- a/Modules/sre.h +++ b/Modules/sre.h @@ -31,9 +31,7 @@ typedef struct { PyObject* pattern; /* pattern source (or None) */ int flags; /* flags used when compiling pattern source */ PyObject *weakreflist; /* List of weak references */ - int logical_charsize; /* pattern charsize (or -1) */ - int charsize; - Py_buffer view; + int isbytes; /* pattern type (1 - bytes, 0 - string, -1 - None) */ /* pattern code */ Py_ssize_t codesize; SRE_CODE code[1]; @@ -73,9 +71,8 @@ typedef struct { /* attributes for the match object */ PyObject* string; Py_ssize_t pos, endpos; - /* character size */ - int logical_charsize; /* kind of thing: 1 - bytes, 2/4 - unicode */ - int charsize; + int isbytes; + int charsize; /* character size */ /* registers */ Py_ssize_t lastindex; Py_ssize_t lastmark; |