summaryrefslogtreecommitdiff
path: root/pcre_internal.h
diff options
context:
space:
mode:
authorchpe <chpe@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-10-16 15:57:16 +0000
committerchpe <chpe@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-10-16 15:57:16 +0000
commit86ebce6f2c24510ee61d27bf6be4ec34e18ee4d9 (patch)
tree320b2976b258db3c081ef1636dac5280d16ad0b3 /pcre_internal.h
parent1bfe051af5617c37096d2cc683d42f048fd600f9 (diff)
downloadpcre-86ebce6f2c24510ee61d27bf6be4ec34e18ee4d9.tar.gz
pcre32: Remove unnecessary ifdefing
Just define HAS_EXTRALEN etc to 0. This reduces the amount of #ifdef COMPILE_PCRE32. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1114 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_internal.h')
-rw-r--r--pcre_internal.h16
1 files changed, 9 insertions, 7 deletions
diff --git a/pcre_internal.h b/pcre_internal.h
index 1114eaa..1407b78 100644
--- a/pcre_internal.h
+++ b/pcre_internal.h
@@ -914,13 +914,14 @@ code. */
#elif defined COMPILE_PCRE32
-/* These are unnecessary for the 32-bit library */
-#undef MAX_VALUE_FOR_SINGLE_CHAR
-#undef HAS_EXTRALEN
-#undef GET_EXTRALEN
-#undef NOT_FIRSTCHAR
+/* These are trivial for the 32-bit library, since all UTF-32 characters fit
+into one pcre_uchar unit. */
+#define MAX_VALUE_FOR_SINGLE_CHAR (0x10ffffu)
+#define HAS_EXTRALEN(c) (0)
+#define GET_EXTRALEN(c) (0)
+#define NOT_FIRSTCHAR(c) (0)
-#define UTF32_MASK (0x1ffffful)
+#define UTF32_MASK (0x1fffffu)
/* Get the next UTF-32 character, not advancing the pointer. This is called when
we know we are in UTF-32 mode. */
@@ -989,7 +990,8 @@ pointer. */
/* If the pointer is not at the start of a character, move it back until
it is. This is called only in UTF-32 mode - we don't put a test within the
macro because almost all calls are already within a block of UTF-32 only
-code. */
+code.
+These are all no-ops since all UTF-32 characters fit into one pcre_uchar. */
#define BACKCHAR(eptr) do { } while (0)