summaryrefslogtreecommitdiff
path: root/pcre_internal.h
diff options
context:
space:
mode:
authorchpe <chpe@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-11-03 19:21:37 +0000
committerchpe <chpe@2f5784b3-3f2a-0410-8824-cb99058d5e15>2012-11-03 19:21:37 +0000
commit32d316a0ee9cd95c2f0f02b65759256eea89ea13 (patch)
tree4b511f244eb1bacf319c6cae09dda87f3b9bfd1a /pcre_internal.h
parentc683f7e1c262a656f0afbd73e85a5eed66849365 (diff)
downloadpcre-32d316a0ee9cd95c2f0f02b65759256eea89ea13.tar.gz
Fix compile-time assertion to test the right thing
The assertion needs to test that the *public* definition of the 32-bit character is a 32-bit integer type, not the *private* definition. git-svn-id: svn://vcs.exim.org/pcre/code/trunk@1199 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_internal.h')
-rw-r--r--pcre_internal.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/pcre_internal.h b/pcre_internal.h
index 3adc612..e2dada8 100644
--- a/pcre_internal.h
+++ b/pcre_internal.h
@@ -279,9 +279,6 @@ typedef pcre_uint32 pcre_uchar;
#define MAX_255(c) ((c) <= 255u)
#define TABLE_GET(c, table, default) (MAX_255(c)? ((table)[c]):(default))
-/* Assert that pcre_uchar32 is a 32-bit type */
-typedef int __assert_pcre_uchar32_size[sizeof(pcre_uchar) == 4 ? 1 : -1];
-
#else
#error Unsupported compiling mode
#endif /* COMPILE_PCRE[8|16|32] */
@@ -351,6 +348,11 @@ values. */
#include "pcre.h"
#include "ucp.h"
+#ifdef COMPILE_PCRE32
+/* Assert that the public PCRE_UCHAR32 is a 32-bit type */
+typedef int __assert_pcre_uchar32_size[sizeof(PCRE_UCHAR32) == 4 ? 1 : -1];
+#endif
+
/* When compiling for use with the Virtual Pascal compiler, these functions
need to have their names changed. PCRE must be compiled with the -DVPCOMPAT
option on the command line. */