Impl ssize_t
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 @@
     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 @@
     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 @@
 #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 @@
     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 */