Skip to content

Commit fa1e3f9

Browse files
Remove pcre_get_compiled_regex_ex() (#10354)
1 parent 8d21a6b commit fa1e3f9

File tree

3 files changed

+4
-20
lines changed

3 files changed

+4
-20
lines changed

UPGRADING.INTERNALS

+4
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,10 @@ PHP 8.3 INTERNALS UPGRADE NOTES
6565
mysqlnd_command::shutdown & mysqlnd_conn_data::shutdown have been removed.
6666
These functions are deprecated by MySQL in favour of SHUTDOWN SQL statement.
6767

68+
d. ext/pcre
69+
- The function pcre_get_compiled_regex_ex has been removed.
70+
Use pcre_get_compiled_regex instead.
71+
6872
========================
6973
4. OpCode changes
7074
========================

ext/pcre/php_pcre.c

-19
Original file line numberDiff line numberDiff line change
@@ -910,25 +910,6 @@ PHPAPI pcre2_code *pcre_get_compiled_regex(zend_string *regex, uint32_t *capture
910910
}
911911
/* }}} */
912912

913-
/* {{{ pcre_get_compiled_regex_ex */
914-
PHPAPI pcre2_code* pcre_get_compiled_regex_ex(zend_string *regex, uint32_t *capture_count, uint32_t *preg_options, uint32_t *compile_options)
915-
{
916-
pcre_cache_entry * pce = pcre_get_compiled_regex_cache(regex);
917-
918-
if (preg_options) {
919-
*preg_options = pce ? pce->preg_options : 0;
920-
}
921-
if (compile_options) {
922-
*compile_options = pce ? pce->compile_options : 0;
923-
}
924-
if (capture_count) {
925-
*capture_count = pce ? pce->capture_count : 0;
926-
}
927-
928-
return pce ? pce->re : NULL;
929-
}
930-
/* }}} */
931-
932913
/* XXX For the cases where it's only about match yes/no and no capture
933914
required, perhaps just a minimum sized data would suffice. */
934915
PHPAPI pcre2_match_data *php_pcre_create_match_data(uint32_t capture_count, pcre2_code *re)

ext/pcre/php_pcre.h

-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,6 @@
2727

2828
PHPAPI zend_string *php_pcre_replace(zend_string *regex, zend_string *subject_str, const char *subject, size_t subject_len, zend_string *replace_str, size_t limit, size_t *replace_count);
2929
PHPAPI pcre2_code* pcre_get_compiled_regex(zend_string *regex, uint32_t *capture_count);
30-
PHPAPI pcre2_code* pcre_get_compiled_regex_ex(zend_string *regex, uint32_t *capture_count, uint32_t *preg_options, uint32_t *coptions);
3130

3231
extern zend_module_entry pcre_module_entry;
3332
#define pcre_module_ptr &pcre_module_entry

0 commit comments

Comments
 (0)