summaryrefslogtreecommitdiff
path: root/ext/pcre
Commit message (Collapse)AuthorAgeFilesLines
* Fixed bug #77338Nikita Popov2018-12-261-2/+2
| | | | | | | | | | Set preg_options to 0 in php_pcre_get_compiled_regex(_ex). These options are intended to be passed to pcre2_match. However, we do not have any flags that actually need to be set during matching (all relevant flags are set during compilation), and the preg_flags value is used for PHP-specific flags instead. This parameter should be removed entirely in master to avoid confusion.
* Fixed bug #77193 Infinite loop in preg_replace_callbackAnatol Belski2018-12-012-8/+41
| | | | Don't return preallocated match data more than once in nested calls.
* Implement handling for JIT recognition when cross compilingAnatol Belski2018-11-051-2/+10
|
* Change the way JIT availability is checkedAnatol Belski2018-11-031-9/+24
| | | | | | | | | | | | | The pcre2_jit_compile_8 sysmbol is always available, even JIT might be not. If JIT is not enabled explicitly and is enabled in the PHP runtime, this will lead to a malfunction. This approach ensures JIT is indeed available on the given platform. For cross compilation this might get complicated, as it would require an explicit processor architecture and PCRE2 version check. Another solution for this case is to run pcre2_config at runtime. That however would require more condition checks that would impact architectures where JIT is available.
* Sync leading and final newlines in *.phpt sectionsPeter Kokot2018-10-1528-35/+15
| | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines in all *.phpt sections. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* Trim trailing whitespace in *.phptPeter Kokot2018-10-1430-50/+50
|
* Sync leading and final newlines in source code filesPeter Kokot2018-10-143-3/+0
| | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
* Convert CRLF line endings to LFPeter Kokot2018-10-131-27/+27
| | | | | | | | | | | | | | | | | | | | | | | | This patch simplifies line endings tracked in the Git repository and syncs them to all include the LF style instead of the CRLF files. Newline characters: - LF (\n) (*nix and Mac) - CRLF (\r\n) (Windows) - CR (\r) (old Mac, obsolete) To see which line endings are in the index and in the working copy the following command can be used: `git ls-files --eol` Git additionally provides `.gitattributes` file to specify if some files need to have specific line endings on all platforms (either CRLF or LF). Changed files shouldn't cause issues on modern Windows platforms because also Git can do output conversion is core.autocrlf=true is set on Windows and use CRLF newlines in all files in the working tree. Unless CRLF files are tracked specifically, Git by default tracks all files in the index using LF newlines.
* Allow to disable pcre.jit when system library is usedRemi Collet2018-10-041-7/+9
| | | | as it is for now broken on some arch (s390x...)
* Fix test and add skip sectionAnatol Belski2018-09-221-2/+8
|
* Add test for bug #76909Anatol Belski2018-09-211-0/+21
|
* Fixed bug #76909 preg_match difference between 7.3 and < 7.3Anatol Belski2018-09-211-3/+3
| | | | Applied upstream patch, see https://bugs.exim.org/show_bug.cgi?id=2321
* Upgrade PCRE2 to 10.32Anatol Belski2018-09-2136-4038/+4870
| | | | (cherry picked from commit d918e0776b5168aed2707b0ca500589844f0faa8)
* Skip test on unsuitable envAnatol Belski2018-09-101-0/+7
|
* Make a copy unconditionallyAnatol Belski2018-09-091-1/+1
|
* Fix memory leak in pcre cacheAnatol Belski2018-09-091-2/+7
|
* Add test for bug #76850Anatol Belski2018-09-081-0/+21
|
* Fixed bug #76850 Exit code mangled by set locale/preg_matchAnatol Belski2018-09-081-1/+4
|
* Remove superfluous SKIPIF sections of always available functionsGabriel Caruso2018-07-292-5/+0
|
* Trim trailing whitespaces in build filesPeter Kokot2018-07-291-1/+1
| | | | | | | | Some editors utilizing .editorconfig automatically trim whitespaces. For convenience this patch removes whitespaces in certain build files: - ext/*/config*.m4 - configure.ac - acinclude.m4
* Remove extra semicolonsGabriel Caruso2018-07-252-2/+2
|
* Fix typos in code commentsPeter Kokot2018-07-251-1/+1
|
* Remove unused Git attributes identPeter Kokot2018-07-254-8/+1
| | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* Removed redundand codeDmitry Stogov2018-07-191-21/+0
|
* Matching loops optimizationDmitry Stogov2018-07-191-156/+233
|
* Micro optimizationsDmitry Stogov2018-07-191-28/+36
|
* Reorder conditionsDmitry Stogov2018-07-181-44/+66
|
* Move "/e" modifier check into regex compilerDmitry Stogov2018-07-181-10/+12
|
* Merge "no_utf_check" and "g_notempty" into single "options".Dmitry Stogov2018-07-181-65/+52
|
* Mark conditions unexpectedAnatol Belski2018-07-111-2/+2
|
* Reduce error buffer sizeAnatol Belski2018-07-051-1/+1
| | | | 120 bytes is ample, the doc says.
* Check return value of pcre2_maketables()Anatol Belski2018-06-291-0/+7
|
* Remove obsolete version checks in testsAnatol Belski2018-06-223-14/+0
|
* If there's no setlocale, char tables are not usedAnatol Belski2018-06-221-0/+2
|
* Don't discard char tables just generatedAnatol Belski2018-06-221-10/+1
|
* Improve locale character tables handling and reduce pattern cache sizeAnatol Belski2018-06-221-15/+26
| | | | | | | | | | | | If a locale other than C is active, character tables are saved into the compile context. Every compiled pattern will have a pointer to the character table, that was present in the context at the time of the pattern compilation. Thus, the cache entries don't need to carry char tables pointer, which reduces their size to 8 bytes on 64-bit. Instead, the generated character tables are tracked in a separate HashTable. If a character table was generated before, it'll be assigned to the compile context when the locale changes. Otherwise a new char table will be generated and cached.
* Fixed bug #76514 Regression in preg_match makes it fail with ↵Anatol Belski2018-06-222-1/+543
| | | | | | | PREG_JIT_STACKLIMIT_ERROR Looks like some patterns might require more stack for JIT execution. It is a regression, as the same pattern was passing using JIT.
* Fix line endings in new PHPTChristoph M. Becker2018-06-221-10/+10
|
* Fix #76512: \w no longer includes unicode charactersChristoph M. Becker2018-06-213-18/+14
| | | | | | | | The migration from PCRE to PCRE2 missed to rename once occurrence of `PCRE_UCP` to `PCRE2_UCP`. We fix that. We also revert the changes to bug52971.phpt which had been incorrectly made in commit a5bc5ae[1]. [1] <http://git.php.net/?p=php-src.git;a=commit;h=a5bc5aed71f7a15f14f33bb31b8e17bf5f327e2d>
* Use zend_string_release_ex() instread of zend_string_release() in places, ↵Dmitry Stogov2018-05-281-23/+23
| | | | where we sure about string persistence.
* Switch to more robust config for external pcre2Anatol Belski2018-04-261-43/+29
| | | | | | | For the standard layout the first option is pkg-config. Otherwise, pcre2-config is used, which is produced by a manual installation into a prefix. This removes the most of the hackish pieces like checking for the lib filenames and parsing headers.
* Fix regexAnatol Belski2018-04-251-2/+2
|
* Revamp pcre config for build with external libAnatol Belski2018-04-251-13/+31
| | | | | | | - support multiarch in addition to the usual lib path - fix symbol checks - fix jit availability check - exit early on unsupported version
* Fix lib names for build with external libpcre2Anatol Belski2018-04-241-2/+2
|
* remove support for string|unicode in testsGabriel Caruso2018-02-221-4/+4
|
* Use EXPECT instead of EXPECTF when possibleGabriel Caruso2018-02-2018-18/+18
| | | | EXPECTF logic in run-tests.php is considerable, so let's avoid it.
* Reduce var scopeAnatol Belski2018-02-171-1/+2
|
* Upgrade bundled PCRE2 to 10.31Anatol Belski2018-02-1439-3173/+4890
|
* Remove trailing whitespace in inc filesGabriel Caruso2018-02-101-1/+1
|
* Use int instead of integer in type errorsGabriel Caruso2018-02-043-8/+8
| | | | | | | PHP requires integer typehints to be written "int" and does not allow "integer" as an alias. This changes type error messages to match the actual type name and avoids confusing messages like "must be of the type integer, integer given".