mirror of
https://github.com/php/php-src.git
synced 2025-08-16 05:58:45 +02:00
Fix mbstring regex variable types to correspond to Oniguruma
The beginning and ending of a Oniguruma Regex are stored in a OnigRegion (which is a typedef to the Oniguruma re_registers struct) as as int* therefore change the type from size_t to int Closes GH-5196
This commit is contained in:
parent
b35b0142e6
commit
c7094d8926
1 changed files with 6 additions and 2 deletions
|
@ -1390,7 +1390,9 @@ _php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAMETERS, int mode)
|
||||||
char *arg_pattern = NULL, *arg_options = NULL;
|
char *arg_pattern = NULL, *arg_options = NULL;
|
||||||
size_t arg_pattern_len, arg_options_len;
|
size_t arg_pattern_len, arg_options_len;
|
||||||
int err;
|
int err;
|
||||||
size_t n, i, pos, len, beg, end;
|
size_t n, i, pos, len;
|
||||||
|
/* Stored as int* in the OnigRegion struct */
|
||||||
|
int beg, end;
|
||||||
OnigOptionType option;
|
OnigOptionType option;
|
||||||
OnigUChar *str;
|
OnigUChar *str;
|
||||||
OnigSyntaxType *syntax;
|
OnigSyntaxType *syntax;
|
||||||
|
@ -1585,7 +1587,9 @@ PHP_FUNCTION(mb_ereg_search_init)
|
||||||
Get matched substring of the last time */
|
Get matched substring of the last time */
|
||||||
PHP_FUNCTION(mb_ereg_search_getregs)
|
PHP_FUNCTION(mb_ereg_search_getregs)
|
||||||
{
|
{
|
||||||
size_t n, i, len, beg, end;
|
size_t n, i, len;
|
||||||
|
/* Stored as int* in the OnigRegion struct */
|
||||||
|
int beg, end;
|
||||||
OnigUChar *str;
|
OnigUChar *str;
|
||||||
|
|
||||||
if (zend_parse_parameters_none() == FAILURE) {
|
if (zend_parse_parameters_none() == FAILURE) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue