mirror of
https://github.com/bdnugget/php-src.git
synced 2026-11-26 18:35:42 +00:00
fixed the mb_regex* stuff
This commit is contained in:
1 parent
2bf8f91b87
commit
2545fbbdc2
1 file changed
+23
-23
+23
-23
@@ -657,10 +657,10 @@ PHP_FUNCTION(mb_regex_encoding)
|
||||
{
|
||||
size_t argc = ZEND_NUM_ARGS();
|
||||
char *encoding;
|
||||
int encoding_len;
|
||||
zend_str_size_int encoding_len;
|
||||
OnigEncoding mbctype;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s", &encoding, &encoding_len) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|S", &encoding, &encoding_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -691,7 +691,7 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
|
||||
{
|
||||
zval **arg_pattern, *array;
|
||||
char *string;
|
||||
int string_len;
|
||||
zend_str_size_int string_len;
|
||||
php_mb_regex_t *re;
|
||||
OnigRegion *regs = NULL;
|
||||
int i, match_len, beg, end;
|
||||
@@ -700,7 +700,7 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
|
||||
|
||||
array = NULL;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zs|z", &arg_pattern, &string, &string_len, &array) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZS|z", &arg_pattern, &string, &string_len, &array) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -789,16 +789,16 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
|
||||
zval **arg_pattern_zval;
|
||||
|
||||
char *arg_pattern;
|
||||
int arg_pattern_len;
|
||||
zend_str_size_int arg_pattern_len;
|
||||
|
||||
char *replace;
|
||||
int replace_len;
|
||||
zend_str_size_int replace_len;
|
||||
|
||||
zend_fcall_info arg_replace_fci;
|
||||
zend_fcall_info_cache arg_replace_fci_cache;
|
||||
|
||||
char *string;
|
||||
int string_len;
|
||||
zend_str_size_int string_len;
|
||||
|
||||
char *p;
|
||||
php_mb_regex_t *re;
|
||||
@@ -827,10 +827,10 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
|
||||
eval = 0;
|
||||
{
|
||||
char *option_str = NULL;
|
||||
int option_str_len = 0;
|
||||
zend_str_size_int option_str_len = 0;
|
||||
|
||||
if (!is_callable) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zss|s",
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZSS|S",
|
||||
&arg_pattern_zval,
|
||||
&replace, &replace_len,
|
||||
&string, &string_len,
|
||||
@@ -838,7 +838,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
|
||||
RETURN_FALSE;
|
||||
}
|
||||
} else {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Zfs|s",
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ZfS|S",
|
||||
&arg_pattern_zval,
|
||||
&arg_replace_fci, &arg_replace_fci_cache,
|
||||
&string, &string_len,
|
||||
@@ -1051,17 +1051,17 @@ PHP_FUNCTION(mb_ereg_replace_callback)
|
||||
PHP_FUNCTION(mb_split)
|
||||
{
|
||||
char *arg_pattern;
|
||||
int arg_pattern_len;
|
||||
zend_str_size_int arg_pattern_len;
|
||||
php_mb_regex_t *re;
|
||||
OnigRegion *regs = NULL;
|
||||
char *string;
|
||||
OnigUChar *pos, *chunk_pos;
|
||||
int string_len;
|
||||
zend_str_size_int string_len;
|
||||
|
||||
int n, err;
|
||||
long count = -1;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &arg_pattern, &arg_pattern_len, &string, &string_len, &count) == FAILURE) {
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|l", &arg_pattern, &arg_pattern_len, &string, &string_len, &count) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
@@ -1130,10 +1130,10 @@ PHP_FUNCTION(mb_split)
|
||||
PHP_FUNCTION(mb_ereg_match)
|
||||
{
|
||||
char *arg_pattern;
|
||||
int arg_pattern_len;
|
||||
zend_str_size_int arg_pattern_len;
|
||||
|
||||
char *string;
|
||||
int string_len;
|
||||
zend_str_size_int string_len;
|
||||
|
||||
php_mb_regex_t *re;
|
||||
OnigSyntaxType *syntax;
|
||||
@@ -1142,9 +1142,9 @@ PHP_FUNCTION(mb_ereg_match)
|
||||
|
||||
{
|
||||
char *option_str = NULL;
|
||||
int option_str_len = 0;
|
||||
zend_str_size_int option_str_len = 0;
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|s",
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|S",
|
||||
&arg_pattern, &arg_pattern_len, &string, &string_len,
|
||||
&option_str, &option_str_len)==FAILURE) {
|
||||
RETURN_FALSE;
|
||||
@@ -1179,13 +1179,13 @@ _php_mb_regex_ereg_search_exec(INTERNAL_FUNCTION_PARAMETERS, int mode)
|
||||
{
|
||||
size_t argc = ZEND_NUM_ARGS();
|
||||
char *arg_pattern, *arg_options;
|
||||
int arg_pattern_len, arg_options_len;
|
||||
zend_str_size_int arg_pattern_len, arg_options_len;
|
||||
int n, i, err, pos, len, beg, end;
|
||||
OnigOptionType option;
|
||||
OnigUChar *str;
|
||||
OnigSyntaxType *syntax;
|
||||
|
||||
if (zend_parse_parameters(argc TSRMLS_CC, "|ss", &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) {
|
||||
if (zend_parse_parameters(argc TSRMLS_CC, "|SS", &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1310,11 +1310,11 @@ PHP_FUNCTION(mb_ereg_search_init)
|
||||
size_t argc = ZEND_NUM_ARGS();
|
||||
zval *arg_str;
|
||||
char *arg_pattern = NULL, *arg_options = NULL;
|
||||
int arg_pattern_len = 0, arg_options_len = 0;
|
||||
zend_str_size_int arg_pattern_len = 0, arg_options_len = 0;
|
||||
OnigSyntaxType *syntax = NULL;
|
||||
OnigOptionType option;
|
||||
|
||||
if (zend_parse_parameters(argc TSRMLS_CC, "z|ss", &arg_str, &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) {
|
||||
if (zend_parse_parameters(argc TSRMLS_CC, "z|SS", &arg_str, &arg_pattern, &arg_pattern_len, &arg_options, &arg_options_len) == FAILURE) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1436,10 +1436,10 @@ PHP_FUNCTION(mb_regex_set_options)
|
||||
OnigOptionType opt;
|
||||
OnigSyntaxType *syntax;
|
||||
char *string = NULL;
|
||||
int string_len;
|
||||
zend_str_size_int string_len;
|
||||
char buf[16];
|
||||
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|s",
|
||||
if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|S",
|
||||
&string, &string_len) == FAILURE) {
|
||||
RETURN_FALSE;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user