Skip to content

Commit 32cceb7

Browse files
committed
Update to libpcre2 10.40
1 parent c654973 commit 32cceb7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+13857
-9257
lines changed

ext/pcre/pcre2lib/pcre2.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
4242
/* The current PCRE version information. */
4343

4444
#define PCRE2_MAJOR 10
45-
#define PCRE2_MINOR 39
45+
#define PCRE2_MINOR 40
4646
#define PCRE2_PRERELEASE
47-
#define PCRE2_DATE 2021-10-29
47+
#define PCRE2_DATE 2022-04-14
4848

4949
/* When an application links to a PCRE DLL in Windows, the symbols that are
5050
imported have to be identified as such. When building PCRE2, the appropriate

ext/pcre/pcre2lib/pcre2_auto_possess.c

+30-13
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ and semantics are as close as possible to those of the Perl 5 language.
77
88
Written by Philip Hazel
99
Original API code Copyright (c) 1997-2012 University of Cambridge
10-
New API code Copyright (c) 2016-2021 University of Cambridge
10+
New API code Copyright (c) 2016-2022 University of Cambridge
1111
1212
-----------------------------------------------------------------------------
1313
Redistribution and use in source and binary forms, with or without
@@ -123,18 +123,21 @@ opcode is used to select the column. The values are as follows:
123123
*/
124124

125125
static const uint8_t propposstab[PT_TABSIZE][PT_TABSIZE] = {
126-
/* ANY LAMP GC PC SC ALNUM SPACE PXSPACE WORD CLIST UCNC */
127-
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_ANY */
128-
{ 0, 3, 0, 0, 0, 3, 1, 1, 0, 0, 0 }, /* PT_LAMP */
129-
{ 0, 0, 2, 4, 0, 9, 10, 10, 11, 0, 0 }, /* PT_GC */
130-
{ 0, 0, 5, 2, 0, 15, 16, 16, 17, 0, 0 }, /* PT_PC */
131-
{ 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0 }, /* PT_SC */
132-
{ 0, 3, 6, 12, 0, 3, 1, 1, 0, 0, 0 }, /* PT_ALNUM */
133-
{ 0, 1, 7, 13, 0, 1, 3, 3, 1, 0, 0 }, /* PT_SPACE */
134-
{ 0, 1, 7, 13, 0, 1, 3, 3, 1, 0, 0 }, /* PT_PXSPACE */
135-
{ 0, 0, 8, 14, 0, 0, 1, 1, 3, 0, 0 }, /* PT_WORD */
136-
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_CLIST */
137-
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3 } /* PT_UCNC */
126+
/* ANY LAMP GC PC SC SCX ALNUM SPACE PXSPACE WORD CLIST UCNC BIDICL BOOL */
127+
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_ANY */
128+
{ 0, 3, 0, 0, 0, 0, 3, 1, 1, 0, 0, 0, 0, 0 }, /* PT_LAMP */
129+
{ 0, 0, 2, 4, 0, 0, 9, 10, 10, 11, 0, 0, 0, 0 }, /* PT_GC */
130+
{ 0, 0, 5, 2, 0, 0, 15, 16, 16, 17, 0, 0, 0, 0 }, /* PT_PC */
131+
{ 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_SC */
132+
{ 0, 0, 0, 0, 2, 2, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_SCX */
133+
{ 0, 3, 6, 12, 0, 0, 3, 1, 1, 0, 0, 0, 0, 0 }, /* PT_ALNUM */
134+
{ 0, 1, 7, 13, 0, 0, 1, 3, 3, 1, 0, 0, 0, 0 }, /* PT_SPACE */
135+
{ 0, 1, 7, 13, 0, 0, 1, 3, 3, 1, 0, 0, 0, 0 }, /* PT_PXSPACE */
136+
{ 0, 0, 8, 14, 0, 0, 0, 1, 1, 3, 0, 0, 0, 0 }, /* PT_WORD */
137+
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_CLIST */
138+
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0 }, /* PT_UCNC */
139+
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }, /* PT_BIDICL */
140+
{ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } /* PT_BOOL */
138141
};
139142

140143
/* This table is used to check whether auto-possessification is possible
@@ -196,6 +199,7 @@ static BOOL
196199
check_char_prop(uint32_t c, unsigned int ptype, unsigned int pdata,
197200
BOOL negated)
198201
{
202+
BOOL ok;
199203
const uint32_t *p;
200204
const ucd_record *prop = GET_UCD(c);
201205

@@ -215,6 +219,11 @@ switch(ptype)
215219
case PT_SC:
216220
return (pdata == prop->script) == negated;
217221

222+
case PT_SCX:
223+
ok = (pdata == prop->script
224+
|| MAPBIT(PRIV(ucd_script_sets) + UCD_SCRIPTX_PROP(prop), pdata) != 0);
225+
return ok == negated;
226+
218227
/* These are specials */
219228

220229
case PT_ALNUM:
@@ -251,6 +260,14 @@ switch(ptype)
251260
if (c == *p++) return negated;
252261
}
253262
break; /* Control never reaches here */
263+
264+
/* Haven't yet thought these through. */
265+
266+
case PT_BIDICL:
267+
return FALSE;
268+
269+
case PT_BOOL:
270+
return FALSE;
254271
}
255272

256273
return FALSE;

0 commit comments

Comments
 (0)