Commit ed69a3a
Add pcre2_substitute checks to enforce pattern, subject, offset and options haven't changed (#807)
* Check for pattern/subject/offset/option changes when using PCRE2_SUBSTITUTE_MATCHED.
* Return PCRE2_ERROR_DFA_UFUNC if using PCRE2_SUBSTITUTE_MATCHED after a call to
pcre2_dfa_match().
* Add new error codes to pcre2_substitute when using PCRE2_SUBSTITUTE_MATCHED.
* Change the behaviour of the matching methods so that the match_data fields are populated
on all matches with "(rc >= 0 || rc==NO_MATCH || rc==PARTIAL)". We previously ensured that
every call to a match method guarantees to set the rc field on the match_data.
* Add modifiers to pcre2test to better exercise these pcre2_substitute conditions
---------
Co-authored-by: Isaac Oscar Gariano <[email protected]>1 parent 783b5f8 commit ed69a3a
File tree
24 files changed
+1358
-658
lines changed- doc
- html
- src
- testdata
24 files changed
+1358
-658
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
94 | | - | |
95 | | - | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
96 | 97 | | |
97 | 98 | | |
98 | 99 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3863 | 3863 | | |
3864 | 3864 | | |
3865 | 3865 | | |
3866 | | - | |
3867 | | - | |
3868 | | - | |
3869 | | - | |
3870 | | - | |
| 3866 | + | |
| 3867 | + | |
| 3868 | + | |
| 3869 | + | |
| 3870 | + | |
| 3871 | + | |
| 3872 | + | |
| 3873 | + | |
| 3874 | + | |
3871 | 3875 | | |
3872 | 3876 | | |
3873 | 3877 | | |
| |||
3883 | 3887 | | |
3884 | 3888 | | |
3885 | 3889 | | |
| 3890 | + | |
| 3891 | + | |
| 3892 | + | |
| 3893 | + | |
| 3894 | + | |
| 3895 | + | |
| 3896 | + | |
| 3897 | + | |
| 3898 | + | |
| 3899 | + | |
| 3900 | + | |
| 3901 | + | |
3886 | 3902 | | |
3887 | 3903 | | |
3888 | 3904 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1194 | 1194 | | |
1195 | 1195 | | |
1196 | 1196 | | |
1197 | | - | |
| 1197 | + | |
| 1198 | + | |
1198 | 1199 | | |
1199 | 1200 | | |
1200 | 1201 | | |
| |||
1369 | 1370 | | |
1370 | 1371 | | |
1371 | 1372 | | |
| 1373 | + | |
1372 | 1374 | | |
1373 | 1375 | | |
1374 | 1376 | | |
1375 | 1377 | | |
1376 | | - | |
| 1378 | + | |
1377 | 1379 | | |
1378 | 1380 | | |
1379 | 1381 | | |
| |||
1385 | 1387 | | |
1386 | 1388 | | |
1387 | 1389 | | |
| 1390 | + | |
1388 | 1391 | | |
1389 | 1392 | | |
1390 | 1393 | | |
| |||
1615 | 1618 | | |
1616 | 1619 | | |
1617 | 1620 | | |
| 1621 | + | |
| 1622 | + | |
| 1623 | + | |
| 1624 | + | |
| 1625 | + | |
| 1626 | + | |
| 1627 | + | |
1618 | 1628 | | |
1619 | 1629 | | |
1620 | 1630 | | |
| |||
0 commit comments