summaryrefslogtreecommitdiff
path: root/src/regex.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/regex.h')
-rw-r--r--src/regex.h9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/regex.h b/src/regex.h
index b4aad6daac9..6974951f575 100644
--- a/src/regex.h
+++ b/src/regex.h
@@ -270,8 +270,10 @@ extern ptrdiff_t emacs_re_safe_alloca;
#ifdef RE_DUP_MAX
# undef RE_DUP_MAX
#endif
-/* If sizeof(int) == 2, then ((1 << 15) - 1) overflows. */
-#define RE_DUP_MAX (0x7fff)
+/* Repeat counts are stored in opcodes as 2 byte integers. This was
+ previously limited to 7fff because the parsing code uses signed
+ ints. But Emacs only runs on 32 bit platforms anyway. */
+#define RE_DUP_MAX (0xffff)
/* POSIX `cflags' bits (i.e., information for `regcomp'). */
@@ -337,7 +339,8 @@ typedef enum
REG_EEND, /* Premature end. */
REG_ESIZE, /* Compiled pattern bigger than 2^16 bytes. */
REG_ERPAREN, /* Unmatched ) or \); not returned from regcomp. */
- REG_ERANGEX /* Range striding over charsets. */
+ REG_ERANGEX, /* Range striding over charsets. */
+ REG_ESIZEBR /* n or m too big in \{n,m\} */
} reg_errcode_t;
/* This data structure represents a compiled pattern. Before calling