diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-06-12 03:05:40 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-06-12 03:05:40 (GMT) |
commit | a6d80faf6c7074ad970a2ba15e825d5343a37ec3 (patch) | |
tree | 9a0b424509b173ca2a6841dc7a8093a9d1cb5872 /Modules/sre.h | |
parent | 052cbcf635d0ab8a3d7690ba8bb50c3a88d59c0a (diff) | |
download | cpython-a6d80faf6c7074ad970a2ba15e825d5343a37ec3.zip cpython-a6d80faf6c7074ad970a2ba15e825d5343a37ec3.tar.gz cpython-a6d80faf6c7074ad970a2ba15e825d5343a37ec3.tar.bz2 |
Impl ssize_t
Diffstat (limited to 'Modules/sre.h')
-rw-r--r-- | Modules/sre.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/Modules/sre.h b/Modules/sre.h index b07d210..d4af05c 100644 --- a/Modules/sre.h +++ b/Modules/sre.h @@ -23,7 +23,7 @@ typedef struct { PyObject_VAR_HEAD - int groups; /* must be first! */ + Py_ssize_t groups; /* must be first! */ PyObject* groupindex; PyObject* indexgroup; /* compatibility */ @@ -31,7 +31,7 @@ typedef struct { int flags; /* flags used when compiling pattern source */ PyObject *weakreflist; /* List of weak references */ /* pattern code */ - int codesize; + Py_ssize_t codesize; SRE_CODE code[1]; } PatternObject; @@ -42,10 +42,10 @@ typedef struct { PyObject* string; /* link to the target string (must be first) */ PyObject* regs; /* cached list of matching spans */ PatternObject* pattern; /* link to the regex (pattern) object */ - int pos, endpos; /* current target slice */ - int lastindex; /* last index marker seen by the engine (-1 if none) */ - int groups; /* number of groups (start/end marks) */ - int mark[1]; + Py_ssize_t pos, endpos; /* current target slice */ + Py_ssize_t lastindex; /* last index marker seen by the engine (-1 if none) */ + Py_ssize_t groups; /* number of groups (start/end marks) */ + Py_ssize_t mark[1]; } MatchObject; typedef unsigned int (*SRE_TOLOWER_HOOK)(unsigned int ch); @@ -54,7 +54,7 @@ typedef unsigned int (*SRE_TOLOWER_HOOK)(unsigned int ch); #define SRE_MARK_SIZE 200 typedef struct SRE_REPEAT_T { - int count; + Py_ssize_t count; SRE_CODE* pattern; /* points to REPEAT operator arguments */ void* last_ptr; /* helper to check for infinite loops */ struct SRE_REPEAT_T *prev; /* points to previous repeat context */ @@ -68,17 +68,17 @@ typedef struct { void* end; /* end of original string */ /* attributes for the match object */ PyObject* string; - int pos, endpos; + Py_ssize_t pos, endpos; /* character size */ int charsize; /* registers */ - int lastindex; - int lastmark; + Py_ssize_t lastindex; + Py_ssize_t lastmark; void* mark[SRE_MARK_SIZE]; /* dynamically allocated stuff */ char* data_stack; - unsigned int data_stack_size; - unsigned int data_stack_base; + size_t data_stack_size; + size_t data_stack_base; /* current repeat context */ SRE_REPEAT *repeat; /* hooks */ |