diff options
Diffstat (limited to 'Modules/sre.h')
-rw-r--r-- | Modules/sre.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/sre.h b/Modules/sre.h index 6819698558..0a8f0cfe3d 100644 --- a/Modules/sre.h +++ b/Modules/sre.h @@ -19,7 +19,7 @@ #if SIZEOF_SIZE_T > 4 # define SRE_MAXREPEAT (~(SRE_CODE)0) #else -# define SRE_MAXREPEAT ((SRE_CODE)PY_SSIZE_T_MAX + 1u) +# define SRE_MAXREPEAT ((SRE_CODE)PY_SSIZE_T_MAX) #endif typedef struct { @@ -31,7 +31,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; @@ -73,6 +74,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; |