@@ -42,9 +42,9 @@ POSSIBILITY OF SUCH DAMAGE.
42
42
/* The current PCRE version information. */
43
43
44
44
#define PCRE2_MAJOR 10
45
- #define PCRE2_MINOR 44
45
+ #define PCRE2_MINOR 45
46
46
#define PCRE2_PRERELEASE
47
- #define PCRE2_DATE 2024-06-07
47
+ #define PCRE2_DATE 2025-02-05
48
48
49
49
/* When an application links to a PCRE DLL in Windows, the symbols that are
50
50
imported have to be identified as such. When building PCRE2, the appropriate
@@ -143,6 +143,7 @@ D is inspected during pcre2_dfa_match() execution
143
143
#define PCRE2_EXTENDED_MORE 0x01000000u /* C */
144
144
#define PCRE2_LITERAL 0x02000000u /* C */
145
145
#define PCRE2_MATCH_INVALID_UTF 0x04000000u /* J M D */
146
+ #define PCRE2_ALT_EXTENDED_CLASS 0x08000000u /* C */
146
147
147
148
/* An additional compile options word is available in the compile context. */
148
149
@@ -159,13 +160,18 @@ D is inspected during pcre2_dfa_match() execution
159
160
#define PCRE2_EXTRA_ASCII_BSW 0x00000400u /* C */
160
161
#define PCRE2_EXTRA_ASCII_POSIX 0x00000800u /* C */
161
162
#define PCRE2_EXTRA_ASCII_DIGIT 0x00001000u /* C */
163
+ #define PCRE2_EXTRA_PYTHON_OCTAL 0x00002000u /* C */
164
+ #define PCRE2_EXTRA_NO_BS0 0x00004000u /* C */
165
+ #define PCRE2_EXTRA_NEVER_CALLOUT 0x00008000u /* C */
166
+ #define PCRE2_EXTRA_TURKISH_CASING 0x00010000u /* C */
162
167
163
168
/* These are for pcre2_jit_compile(). */
164
169
165
170
#define PCRE2_JIT_COMPLETE 0x00000001u /* For full matching */
166
171
#define PCRE2_JIT_PARTIAL_SOFT 0x00000002u
167
172
#define PCRE2_JIT_PARTIAL_HARD 0x00000004u
168
173
#define PCRE2_JIT_INVALID_UTF 0x00000100u
174
+ #define PCRE2_JIT_TEST_ALLOC 0x00000200u
169
175
170
176
/* These are for pcre2_match(), pcre2_dfa_match(), pcre2_jit_match(), and
171
177
pcre2_substitute(). Some are allowed only for one of the functions, and in
@@ -318,9 +324,25 @@ pcre2_pattern_convert(). */
318
324
#define PCRE2_ERROR_ALPHA_ASSERTION_UNKNOWN 195
319
325
#define PCRE2_ERROR_SCRIPT_RUN_NOT_AVAILABLE 196
320
326
#define PCRE2_ERROR_TOO_MANY_CAPTURES 197
321
- #define PCRE2_ERROR_CONDITION_ATOMIC_ASSERTION_EXPECTED 198
327
+ #define PCRE2_ERROR_MISSING_OCTAL_DIGIT 198
322
328
#define PCRE2_ERROR_BACKSLASH_K_IN_LOOKAROUND 199
323
-
329
+ #define PCRE2_ERROR_MAX_VAR_LOOKBEHIND_EXCEEDED 200
330
+ #define PCRE2_ERROR_PATTERN_COMPILED_SIZE_TOO_BIG 201
331
+ #define PCRE2_ERROR_OVERSIZE_PYTHON_OCTAL 202
332
+ #define PCRE2_ERROR_CALLOUT_CALLER_DISABLED 203
333
+ #define PCRE2_ERROR_EXTRA_CASING_REQUIRES_UNICODE 204
334
+ #define PCRE2_ERROR_TURKISH_CASING_REQUIRES_UTF 205
335
+ #define PCRE2_ERROR_EXTRA_CASING_INCOMPATIBLE 206
336
+ #define PCRE2_ERROR_ECLASS_NEST_TOO_DEEP 207
337
+ #define PCRE2_ERROR_ECLASS_INVALID_OPERATOR 208
338
+ #define PCRE2_ERROR_ECLASS_UNEXPECTED_OPERATOR 209
339
+ #define PCRE2_ERROR_ECLASS_EXPECTED_OPERAND 210
340
+ #define PCRE2_ERROR_ECLASS_MIXED_OPERATORS 211
341
+ #define PCRE2_ERROR_ECLASS_HINT_SQUARE_BRACKET 212
342
+ #define PCRE2_ERROR_PERL_ECLASS_UNEXPECTED_EXPR 213
343
+ #define PCRE2_ERROR_PERL_ECLASS_EMPTY_EXPR 214
344
+ #define PCRE2_ERROR_PERL_ECLASS_MISSING_CLOSE 215
345
+ #define PCRE2_ERROR_PERL_ECLASS_UNEXPECTED_CHAR 216
324
346
325
347
/* "Expected" matching error codes: no match and partial match. */
326
348
@@ -407,6 +429,9 @@ released, the numbers must not be changed. */
407
429
#define PCRE2_ERROR_INTERNAL_DUPMATCH (-65)
408
430
#define PCRE2_ERROR_DFA_UINVALID_UTF (-66)
409
431
#define PCRE2_ERROR_INVALIDOFFSET (-67)
432
+ #define PCRE2_ERROR_JIT_UNSUPPORTED (-68)
433
+ #define PCRE2_ERROR_REPLACECASE (-69)
434
+ #define PCRE2_ERROR_TOOLARGEREPLACE (-70)
410
435
411
436
412
437
/* Request types for pcre2_pattern_info() */
@@ -460,6 +485,30 @@ released, the numbers must not be changed. */
460
485
#define PCRE2_CONFIG_COMPILED_WIDTHS 14
461
486
#define PCRE2_CONFIG_TABLES_LENGTH 15
462
487
488
+ /* Optimization directives for pcre2_set_optimize().
489
+ For binary compatibility, only add to this list; do not renumber. */
490
+
491
+ #define PCRE2_OPTIMIZATION_NONE 0
492
+ #define PCRE2_OPTIMIZATION_FULL 1
493
+
494
+ #define PCRE2_AUTO_POSSESS 64
495
+ #define PCRE2_AUTO_POSSESS_OFF 65
496
+ #define PCRE2_DOTSTAR_ANCHOR 66
497
+ #define PCRE2_DOTSTAR_ANCHOR_OFF 67
498
+ #define PCRE2_START_OPTIMIZE 68
499
+ #define PCRE2_START_OPTIMIZE_OFF 69
500
+
501
+ /* Types used in pcre2_set_substitute_case_callout().
502
+
503
+ PCRE2_SUBSTITUTE_CASE_LOWER and PCRE2_SUBSTITUTE_CASE_UPPER are passed to the
504
+ callout to indicate that the case of the entire callout input should be
505
+ case-transformed. PCRE2_SUBSTITUTE_CASE_TITLE_FIRST is passed to indicate that
506
+ only the first character or glyph should be transformed to Unicode titlecase,
507
+ and the rest to lowercase. */
508
+
509
+ #define PCRE2_SUBSTITUTE_CASE_LOWER 1
510
+ #define PCRE2_SUBSTITUTE_CASE_UPPER 2
511
+ #define PCRE2_SUBSTITUTE_CASE_TITLE_FIRST 3
463
512
464
513
/* Types for code units in patterns and subject strings. */
465
514
@@ -613,7 +662,9 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
613
662
pcre2_set_parens_nest_limit(pcre2_compile_context *, uint32_t); \
614
663
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
615
664
pcre2_set_compile_recursion_guard(pcre2_compile_context *, \
616
- int (*)(uint32_t, void *), void *);
665
+ int (*)(uint32_t, void *), void *); \
666
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
667
+ pcre2_set_optimize(pcre2_compile_context *, uint32_t);
617
668
618
669
#define PCRE2_MATCH_CONTEXT_FUNCTIONS \
619
670
PCRE2_EXP_DECL pcre2_match_context *PCRE2_CALL_CONVENTION \
@@ -628,6 +679,11 @@ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
628
679
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
629
680
pcre2_set_substitute_callout(pcre2_match_context *, \
630
681
int (*)(pcre2_substitute_callout_block *, void *), void *); \
682
+ PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
683
+ pcre2_set_substitute_case_callout(pcre2_match_context *, \
684
+ PCRE2_SIZE (*)(PCRE2_SPTR, PCRE2_SIZE, PCRE2_UCHAR *, PCRE2_SIZE, int, \
685
+ void *), \
686
+ void *); \
631
687
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
632
688
pcre2_set_depth_limit(pcre2_match_context *, uint32_t); \
633
689
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
@@ -740,6 +796,7 @@ PCRE2_EXP_DECL void PCRE2_CALL_CONVENTION \
740
796
PCRE2_EXP_DECL int PCRE2_CALL_CONVENTION \
741
797
pcre2_substring_list_get(pcre2_match_data *, PCRE2_UCHAR ***, PCRE2_SIZE **);
742
798
799
+
743
800
/* Functions for serializing / deserializing compiled patterns. */
744
801
745
802
#define PCRE2_SERIALIZE_FUNCTIONS \
@@ -907,7 +964,9 @@ pcre2_compile are called by application code. */
907
964
#define pcre2_set_newline PCRE2_SUFFIX(pcre2_set_newline_)
908
965
#define pcre2_set_parens_nest_limit PCRE2_SUFFIX(pcre2_set_parens_nest_limit_)
909
966
#define pcre2_set_offset_limit PCRE2_SUFFIX(pcre2_set_offset_limit_)
967
+ #define pcre2_set_optimize PCRE2_SUFFIX(pcre2_set_optimize_)
910
968
#define pcre2_set_substitute_callout PCRE2_SUFFIX(pcre2_set_substitute_callout_)
969
+ #define pcre2_set_substitute_case_callout PCRE2_SUFFIX(pcre2_set_substitute_case_callout_)
911
970
#define pcre2_substitute PCRE2_SUFFIX(pcre2_substitute_)
912
971
#define pcre2_substring_copy_byname PCRE2_SUFFIX(pcre2_substring_copy_byname_)
913
972
#define pcre2_substring_copy_bynumber PCRE2_SUFFIX(pcre2_substring_copy_bynumber_)
0 commit comments