- 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
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 @@
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 @@
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 @@
} SRE_STATE;
typedef struct {
- /* search helper */
+ /* scanner (internal helper object) */
PyObject_HEAD
PyObject* pattern;
PyObject* string;
SRE_STATE state;
-} CursorObject;
+} ScannerObject;
#endif