summaryrefslogtreecommitdiff
path: root/pcre_xclass.c
diff options
context:
space:
mode:
authorph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2008-07-02 18:42:11 +0000
committerph10 <ph10@2f5784b3-3f2a-0410-8824-cb99058d5e15>2008-07-02 18:42:11 +0000
commit0370f4b1717db0570c3a13e0ec7396c07075c8b3 (patch)
tree829249de9eea4c693ee4c075ecd22f77687cbb88 /pcre_xclass.c
parente2edacee629fd1fd2e4891078653455f03753d84 (diff)
downloadpcre-0370f4b1717db0570c3a13e0ec7396c07075c8b3.tar.gz
Preliminary patch for upgraded Unicode Property support.
git-svn-id: svn://vcs.exim.org/pcre/code/trunk@349 2f5784b3-3f2a-0410-8824-cb99058d5e15
Diffstat (limited to 'pcre_xclass.c')
-rw-r--r--pcre_xclass.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/pcre_xclass.c b/pcre_xclass.c
index cfb5a77..5516647 100644
--- a/pcre_xclass.c
+++ b/pcre_xclass.c
@@ -104,8 +104,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)
{
@@ -114,20 +113,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] == 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