summaryrefslogtreecommitdiff
path: root/ext/pcre/pcrelib/pcre_study.c
diff options
context:
space:
mode:
authorNuno Lopes <nlopess@php.net>2007-06-15 19:09:26 +0000
committerNuno Lopes <nlopess@php.net>2007-06-15 19:09:26 +0000
commit4e51d2ec73ed84ba0ca2306f5eff8e7af10b97de (patch)
tree11823bd075dc6eb9c3983a2b2262759fdc94648a /ext/pcre/pcrelib/pcre_study.c
parent17db5db75992b14f8f7b4cfb2ac740d402c9619a (diff)
downloadphp-git-4e51d2ec73ed84ba0ca2306f5eff8e7af10b97de.tar.gz
upgrade PCRE to version 7.2 RC3
# I'll update to the final version early next week when its released
Diffstat (limited to 'ext/pcre/pcrelib/pcre_study.c')
-rw-r--r--ext/pcre/pcrelib/pcre_study.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/ext/pcre/pcrelib/pcre_study.c b/ext/pcre/pcrelib/pcre_study.c
index 87f8c6fb51..3cf5b5954d 100644
--- a/ext/pcre/pcrelib/pcre_study.c
+++ b/ext/pcre/pcrelib/pcre_study.c
@@ -6,7 +6,7 @@
and semantics are as close as possible to those of the Perl 5 language.
Written by Philip Hazel
- Copyright (c) 1997-2006 University of Cambridge
+ Copyright (c) 1997-2007 University of Cambridge
-----------------------------------------------------------------------------
Redistribution and use in source and binary forms, with or without
@@ -394,11 +394,13 @@ do
character with a value > 255. */
case OP_NCLASS:
+#ifdef SUPPORT_UTF8
if (utf8)
{
start_bits[24] |= 0xf0; /* Bits for 0xc4 - 0xc8 */
memset(start_bits+25, 0xff, 7); /* Bits for 0xc9 - 0xff */
}
+#endif
/* Fall through */
case OP_CLASS:
@@ -411,6 +413,7 @@ do
value is > 127. In fact, there are only two possible starting bytes for
characters in the range 128 - 255. */
+#ifdef SUPPORT_UTF8
if (utf8)
{
for (c = 0; c < 16; c++) start_bits[c] |= tcode[c];
@@ -428,6 +431,7 @@ do
/* In non-UTF-8 mode, the two bit maps are completely compatible. */
else
+#endif
{
for (c = 0; c < 32; c++) start_bits[c] |= tcode[c];
}
@@ -487,7 +491,7 @@ Returns: pointer to a pcre_extra block, with study_data filled in and the
NULL on error or if no optimization possible
*/
-PCRE_DATA_SCOPE pcre_extra *
+PCRE_EXP_DEFN pcre_extra *
pcre_study(const pcre *external_re, int options, const char **errorptr)
{
uschar start_bits[32];