diff options
author | Fredrik Lundh <fredrik@pythonware.com> | 2000-06-29 16:57:40 (GMT) |
---|---|---|
committer | Fredrik Lundh <fredrik@pythonware.com> | 2000-06-29 16:57:40 (GMT) |
commit | be2211e9401a0be96915c473ef99041beb5a4992 (patch) | |
tree | b69453753d4617d7ac4b6b59fcc5a13cc55cd392 /Modules/sre.h | |
parent | 69218178ec7f1ed64c1da76e1d5a0ae4a9a2e16b (diff) | |
download | cpython-be2211e9401a0be96915c473ef99041beb5a4992.zip cpython-be2211e9401a0be96915c473ef99041beb5a4992.tar.gz cpython-be2211e9401a0be96915c473ef99041beb5a4992.tar.bz2 |
- fixed split
(test_sre still complains about split, but that's caused by
the group reset bug, not split itself)
- added more mark slots
(should be dynamically allocated, but 100 is better than 32.
and checking for the upper limit is better than overwriting
the memory ;-)
- internal: renamed the cursor helper class
- internal: removed some bloat from sre_compile
Diffstat (limited to 'Modules/sre.h')
-rw-r--r-- | Modules/sre.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Modules/sre.h b/Modules/sre.h index a7786ed..722f890 100644 --- a/Modules/sre.h +++ b/Modules/sre.h @@ -46,6 +46,9 @@ typedef struct { void* ptr; } SRE_STACK; +/* FIXME: <fl> shouldn't be a constant, really... */ +#define SRE_MARK_SIZE 200 + typedef struct { /* string pointers */ void* ptr; /* current position (also end of current slice) */ @@ -56,7 +59,7 @@ typedef struct { int charsize; /* registers */ int lastmark; - void* mark[64]; /* FIXME: <fl> should be dynamically allocated! */ + void* mark[SRE_MARK_SIZE]; /* backtracking stack */ SRE_STACK* stack; int stacksize; @@ -66,11 +69,11 @@ typedef struct { } SRE_STATE; typedef struct { - /* search helper */ + /* scanner (internal helper object) */ PyObject_HEAD PyObject* pattern; PyObject* string; SRE_STATE state; -} CursorObject; +} ScannerObject; #endif |