aboutsummaryrefslogtreecommitdiffstats
path: root/contrib/tools/python3/Modules/_sre/sre.h
diff options
context:
space:
mode:
Diffstat (limited to 'contrib/tools/python3/Modules/_sre/sre.h')
-rw-r--r--contrib/tools/python3/Modules/_sre/sre.h17
1 files changed, 16 insertions, 1 deletions
diff --git a/contrib/tools/python3/Modules/_sre/sre.h b/contrib/tools/python3/Modules/_sre/sre.h
index a0f235606e..b8c6f8e3e6 100644
--- a/contrib/tools/python3/Modules/_sre/sre.h
+++ b/contrib/tools/python3/Modules/_sre/sre.h
@@ -34,6 +34,11 @@ typedef struct {
int flags; /* flags used when compiling pattern source */
PyObject *weakreflist; /* List of weak references */
int isbytes; /* pattern type (1 - bytes, 0 - string, -1 - None) */
+#ifdef Py_DEBUG
+ /* for simulation of user interruption */
+ int fail_after_count;
+ PyObject *fail_after_exc;
+#endif
/* pattern code */
Py_ssize_t codesize;
SRE_CODE code[1];
@@ -68,6 +73,9 @@ typedef struct SRE_REPEAT_T {
const SRE_CODE* pattern; /* points to REPEAT operator arguments */
const void* last_ptr; /* helper to check for infinite loops */
struct SRE_REPEAT_T *prev; /* points to previous repeat context */
+ /* for SRE_REPEAT pool */
+ struct SRE_REPEAT_T *pool_prev;
+ struct SRE_REPEAT_T *pool_next;
} SRE_REPEAT;
typedef struct {
@@ -94,12 +102,19 @@ typedef struct {
size_t data_stack_base;
/* current repeat context */
SRE_REPEAT *repeat;
+ /* SRE_REPEAT pool */
+ SRE_REPEAT *repeat_pool_used;
+ SRE_REPEAT *repeat_pool_unused;
unsigned int sigcount;
+#ifdef Py_DEBUG
+ int fail_after_count;
+ PyObject *fail_after_exc;
+#endif
} SRE_STATE;
typedef struct {
PyObject_HEAD
- PyObject* pattern;
+ PatternObject* pattern;
SRE_STATE state;
int executing;
} ScannerObject;