diff options
Diffstat (limited to 'Modules/sre.h')
-rw-r--r-- | Modules/sre.h | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/Modules/sre.h b/Modules/sre.h index aec9b541dd..00b52aaf4e 100644 --- a/Modules/sre.h +++ b/Modules/sre.h @@ -14,12 +14,8 @@ #include "sre_constants.h" /* size of a code word (must be unsigned short or larger, and - large enough to hold a Py_UNICODE character) */ -#ifdef Py_UNICODE_WIDE + large enough to hold a UCS4 character) */ #define SRE_CODE Py_UCS4 -#else -#define SRE_CODE unsigned short -#endif typedef struct { PyObject_VAR_HEAD @@ -30,7 +26,8 @@ typedef struct { PyObject* pattern; /* pattern source (or None) */ int flags; /* flags used when compiling pattern source */ PyObject *weakreflist; /* List of weak references */ - int charsize; /* pattern charsize (or -1) */ + int logical_charsize; /* pattern charsize (or -1) */ + int charsize; Py_buffer view; /* pattern code */ Py_ssize_t codesize; @@ -72,6 +69,7 @@ typedef struct { PyObject* string; Py_ssize_t pos, endpos; /* character size */ + int logical_charsize; /* kind of thing: 1 - bytes, 2/4 - unicode */ int charsize; /* registers */ Py_ssize_t lastindex; |