Revision: 807
http://vcs.pcre.org/viewvc?view=rev&revision=807
Author: ph10
Date: 2011-12-18 10:03:38 +0000 (Sun, 18 Dec 2011)
Log Message:
-----------
Renamed isnumber in pcre_compile to avoid a clash with ctype.h in Macs, and
fixed a bug in fixed-length calculation for lookbehinds that would show up only
in quite long subpatterns.
Modified Paths:
--------------
code/trunk/ChangeLog
code/trunk/configure.ac
code/trunk/pcre_compile.c
Modified: code/trunk/ChangeLog
===================================================================
--- code/trunk/ChangeLog 2011-12-15 11:57:39 UTC (rev 806)
+++ code/trunk/ChangeLog 2011-12-18 10:03:38 UTC (rev 807)
@@ -1,6 +1,16 @@
ChangeLog for PCRE
------------------
+Version 8.22
+------------
+
+1. Renamed "isnumber" as "is_a_number" because in some Mac environments this
+ name is defined in ctype.h.
+
+2. Fixed a bug in the code for calculating the fixed length of lookbehind
+ assertions.
+
+
Version 8.21 12-Dec-2011
------------------------
Modified: code/trunk/configure.ac
===================================================================
--- code/trunk/configure.ac 2011-12-15 11:57:39 UTC (rev 806)
+++ code/trunk/configure.ac 2011-12-18 10:03:38 UTC (rev 807)
@@ -9,7 +9,7 @@
dnl be defined as -RC2, for example. For real releases, it should be empty.
m4_define(pcre_major, [8])
-m4_define(pcre_minor, [21])
+m4_define(pcre_minor, [22])
m4_define(pcre_prerelease, [])
m4_define(pcre_date, [2011-12-12])
Modified: code/trunk/pcre_compile.c
===================================================================
--- code/trunk/pcre_compile.c 2011-12-15 11:57:39 UTC (rev 806)
+++ code/trunk/pcre_compile.c 2011-12-18 10:03:38 UTC (rev 807)
@@ -1655,7 +1655,8 @@
case OP_ASSERTBACK:
case OP_ASSERTBACK_NOT:
do cc += GET(cc, 1); while (*cc == OP_ALT);
- /* Fall through */
+ cc += _pcre_OP_lengths[*cc];
+ break;
/* Skip over things that don't match chars */
@@ -6450,10 +6451,10 @@
if (ptr[1] != CHAR_PLUS && ptr[1] != CHAR_MINUS)
{
- BOOL isnumber = TRUE;
+ BOOL is_a_number = TRUE;
for (p = ptr + 1; *p != 0 && *p != terminator; p++)
{
- if ((cd->ctypes[*p] & ctype_digit) == 0) isnumber = FALSE;
+ if ((cd->ctypes[*p] & ctype_digit) == 0) is_a_number = FALSE;
if ((cd->ctypes[*p] & ctype_word) == 0) break;
}
if (*p != terminator)
@@ -6461,7 +6462,7 @@
*errorcodeptr = ERR57;
break;
}
- if (isnumber)
+ if (is_a_number)
{
ptr++;
goto HANDLE_NUMERICAL_RECURSION;