summaryrefslogtreecommitdiff
path: root/ext/pcre/php_pcre.h
Commit message (Collapse)AuthorAgeFilesLines
* Replace zend_bool uses with boolNikita Popov2021-01-151-2/+2
| | | | | | | We're starting to see a mix between uses of zend_bool and bool. Replace all usages with the standard bool type everywhere. Of course, zend_bool is retained as an alias.
* Allocate temporary PCRE match data using ZMMNikita Popov2020-09-071-0/+2
| | | | | | | | | | | Create a separate general context that uses ZMM as allocator and use it to allocate temporary PCRE match data (there is still one global match data). There is no requirement that the match data and the compiled regex / match context use the same general context. This makes sure that we do not leak persistent memory on bailout and fixes oss-fuzz #25296, on which half the libfuzzer runs currently get stuck.
* Constify char * arguments of APIstwosee2020-06-081-2/+2
| | | | Closes GH-5676.
* Fix [-Wundef] warning in PCRE extensionGeorge Peter Banyard2020-05-201-1/+1
|
* Add preg_last_error_msg() functionNicolas Oelgart2020-02-251-1/+11
| | | | | | | | Provides the last PCRE error as a human-readable message, similar to functionality existing in other extensions, such as json_last_error_msg(). Closes GH-5185.
* Merge branch 'PHP-7.4'Nikita Popov2019-10-081-0/+1
|\
| * Merge branch 'PHP-7.3' into PHP-7.4Nikita Popov2019-10-081-0/+1
| |\
| | * Merge branch 'PHP-7.2' into PHP-7.3Nikita Popov2019-10-081-0/+1
| | |\
| | | * Add pcre_get_compiled_regex_cache_ex() with local_aware flagSergei Turchanov2019-10-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A new function `pcre_get_compiled_regex_cache_ex()` is introduced, which allows to compile regexp pattern using the "C" locale instead of a current locale. This will be needed to replace setlocale() usage in fileinfo, which is not thread-safe.
| | | * year++Xinchen Hui2018-01-021-1/+1
| | | |
* | | | Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-251-2/+0
|/ / / | | | | | | | | | Closes GH-4732.
* | | Remove checks for locale.h, setlocale, localeconvPeter Kokot2019-04-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `<loccale.h>` header file, setlocale, and localeconv are part of the standard C89 [1] and on current systems can be used unconditionally. Since PHP 7.4 requires at least C89 or greater, the `HAVE_LOCALE_H`, `HAVE_SETLOCALE`, and `HAVE_LOCALECONV` symbols defined by Autoconf in configure.ac [2] can be ommitted and simplifed. The bundled libmagic (file) has also been patched already in version 5.35 and up in upstream location so when it will be patched also in php-src the check for locale.h header is still left in the configure.ac and in windows headers definition file. [1] https://port70.net/~nsz/c/c89/c89-draft.html#4.4 [2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4 Omit the bundled libmagic files
* | | Make PCRE cache per-request on CLINikita Popov2019-03-261-0/+1
| | | | | | | | | | | | | | | | | | There will only be one request on the CLI SAPI, so there is no advantage to having a persistent PCRE cache. Using a non-persistent cache allows us to use arbitrary strings as cache keys.
* | | Remove HAVE_PCRE/HAVE_BUNDLED_PCRE checksNikita Popov2019-03-221-8/+0
| | | | | | | | | | | | PCRE is always available.
* | | Don't create a new array for empty/null match every timeNikita Popov2019-03-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If PREG_OFFSET_CAPTURE is used, unmatched subpatterns will be either [null, -1] or ['', -1] depending on PREG_UNMATCHED_AS_NULL mode. Instead of creating a new array like this every time, cache it inside a global (per-request -- could make it immutable though). Additionally check whether the subpattern is an empty string or single character string and use an existing interned string in that case. Empty / single-char subpatterns are common, so let's avoid allocating strings for them.
* | | Accept zend_string* instead of char* in php_pcre_match_impl()Nikita Popov2019-03-181-1/+1
| | |
* | | Remove yearly range from copyright noticeZeev Suraski2019-01-301-1/+1
| | |
* | | Remove preg_options param from pcre_get_compiled_regex()Nikita Popov2018-12-261-1/+1
|/ / | | | | | | | | | | | | This parameter is always zero and not necessary to call pcre2_match. I'm leaving the parameter behind on the _ex() variant, so the preg_flags are still accessible in some way.
* | Remove unused Git attributes identPeter Kokot2018-07-251-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | year++Xinchen Hui2018-01-021-1/+1
| |
* | Patch core for PCRE2 supportAnatol Belski2017-11-131-21/+20
|/ | | | RFC https://wiki.php.net/rfc/pcre2-migration
* Avoid string duplication in preg_split()Dmitry Stogov2017-06-281-1/+1
|
* preg_replace() optimizationDmitry Stogov2017-06-071-3/+3
|
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* Removed not used fieldXinchen Hui2016-11-201-1/+0
|
* Fix bug #73121 Bundled PCRE doesn't compile because JIT isn't supported on s390Anatol Belski2016-09-231-1/+1
|
* Fix bug #71575 removing extra semicolons outside macrosJames Titcumb2016-03-031-1/+1
|
* Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
|\ | | | | | | | | * PHP-5.6: Happy new year (Update copyright to 2016)
| * Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| |
| * bump yearXinchen Hui2015-01-151-1/+1
| |
* | first stone on using the unified globals accessorAnatol Belski2015-07-291-6/+1
| |
* | Keep realpath and PCRE caches in consistency with opcache SHM.Dmitry Stogov2015-04-221-0/+2
| |
* | cleanup mod version macros, round 3Anatol Belski2015-03-231-0/+3
| |
* | Avoid reallocation in preg_replace() if nothing was replacedDmitry Stogov2015-02-101-2/+2
| |
* | bump yearXinchen Hui2015-01-151-1/+1
| |
* | trailing whitespace removalStanislav Malyshev2015-01-101-2/+2
| |
* | Improved setlocale(). Eliminated locale comparison in ext/pcre if it's not ↵Dmitry Stogov2014-12-191-1/+1
| | | | | | | | necessary.
* | first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-8/+8
| |
* | Merge remote-tracking branch 'origin/master' into native-tlsAnatol Belski2014-11-181-5/+5
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * origin/master: (398 commits) NEWS add test for bug #68381 Fixed bug #68381 Set FPM log level earlier during init proper dllexport move to size_t where zend_string is used internally fix some datatype mismatches return after the warning, to fix uninitialized salt usage fix datatype mismatches add missing type specifier fix datatype mismatches fix unsigned check "extern" shouldn't be used for definitions joined identical conditional blocks simplify fpm tests SEND_VAR_NO_REF optimization Add test for bug #68442 Add various tests for FPM - covering recent bugs (68420, 68421, 68423, 68428) - for UDS - for ping and status URI - for multi pool and multi mode Include small MIT FastCGI client library from https://github.com/adoy/PHP-FastCGI-Client Get rid of zend_free_op structure (use zval* instead). Get rid of useless TSRMLS arguments. Add new FPM test for IPv4/IPv6 ... Conflicts: win32/build/config.w32
| * | fix datatype mismatchesAnatol Belski2014-10-291-5/+5
| | | | | | | | | | | | PCRE uses plain datatypes, no typedefs.
* | | more exts converted for static tsrm ls pointerAnatol Belski2014-10-151-1/+1
|/ / | | | | | | mbstring, pcre, reflection
* | s/PHP 5/PHP 7/Johannes Schlüter2014-09-191-1/+1
| |
* | Avoid unnecessary memory allocation/deallocations and pcre callsDmitry Stogov2014-06-091-0/+2
| |
* | Enable PCRE JIT compilerDmitry Stogov2014-04-251-0/+3
| |
* | Refactor php_pcre_replace to return zend_stringXinchen Hui2014-03-161-3/+3
| |
* | Use better data structures (incomplete)Dmitry Stogov2014-02-101-4/+4
|/
* Bump yearXinchen Hui2014-01-031-1/+1
|
* Happy New YearXinchen Hui2013-01-011-1/+1
|
* - Year++Felipe Pena2012-01-011-1/+1
|
* - Year++Felipe Pena2011-01-011-1/+1
|