merged with pythonware's SRE 2.1.1 codebase
diff --git a/Modules/sre.h b/Modules/sre.h
index 632f47e..365eedb 100644
--- a/Modules/sre.h
+++ b/Modules/sre.h
@@ -3,7 +3,7 @@
  *
  * regular expression matching engine
  *
- * Copyright (c) 1997-2000 by Secret Labs AB.  All rights reserved.
+ * Copyright (c) 1997-2001 by Secret Labs AB.  All rights reserved.
  *
  * See the _sre.c file for information on usage and redistribution.
  */
@@ -21,15 +21,18 @@
 #define SRE_CODE unsigned short
 #endif
 
+#define SRE_CODE unsigned short
+
 typedef struct {
     PyObject_VAR_HEAD
-    int groups;
+    int groups; /* must be first! */
     PyObject* groupindex;
     PyObject* indexgroup;
     /* compatibility */
     PyObject* pattern; /* pattern source (or None) */
     int flags; /* flags used when compiling pattern source */
     /* pattern code */
+    int codesize;
     SRE_CODE code[1];
 } PatternObject;
 
@@ -37,7 +40,7 @@
 
 typedef struct {
     PyObject_VAR_HEAD
-    PyObject* string; /* link to the target string */
+    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 */