summaryrefslogtreecommitdiff
path: root/ext/pcre/pcrelib/pcre_xclass.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/pcre/pcrelib/pcre_xclass.c')
-rw-r--r--ext/pcre/pcrelib/pcre_xclass.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/ext/pcre/pcrelib/pcre_xclass.c b/ext/pcre/pcrelib/pcre_xclass.c
index d22d9e6488..5253b857ad 100644
--- a/ext/pcre/pcrelib/pcre_xclass.c
+++ b/ext/pcre/pcrelib/pcre_xclass.c
@@ -102,8 +102,7 @@ while ((t = *data++) != XCL_END)
#ifdef SUPPORT_UCP
else /* XCL_PROP & XCL_NOTPROP */
{
- int chartype, script;
- int category = _pcre_ucp_findprop(c, &chartype, &script);
+ const ucd_record * prop = GET_UCD(c);
switch(*data)
{
@@ -112,20 +111,20 @@ while ((t = *data++) != XCL_END)
break;
case PT_LAMP:
- if ((chartype == ucp_Lu || chartype == ucp_Ll || chartype == ucp_Lt) ==
+ if ((prop->chartype == ucp_Lu || prop->chartype == ucp_Ll || prop->chartype == ucp_Lt) ==
(t == XCL_PROP)) return !negated;
break;
case PT_GC:
- if ((data[1] == category) == (t == XCL_PROP)) return !negated;
+ if ((data[1] == _pcre_ucp_gentype[prop->chartype]) == (t == XCL_PROP)) return !negated;
break;
case PT_PC:
- if ((data[1] == chartype) == (t == XCL_PROP)) return !negated;
+ if ((data[1] == prop->chartype) == (t == XCL_PROP)) return !negated;
break;
case PT_SC:
- if ((data[1] == script) == (t == XCL_PROP)) return !negated;
+ if ((data[1] == prop->script) == (t == XCL_PROP)) return !negated;
break;
/* This should never occur, but compilers may mutter if there is no