diff options
author | Anatol Belski <ab@php.net> | 2014-08-19 19:42:16 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-08-19 19:42:16 +0200 |
commit | 6428b498519442833afcd032f6648251d8b199fc (patch) | |
tree | 265995a0ba628ba54c477025de78dbf597dd0e45 | |
parent | e8fcd52ef1d2bb215aa40a4b8507a760079e0497 (diff) | |
download | php-git-6428b498519442833afcd032f6648251d8b199fc.tar.gz |
ported ext/mbstring
-rw-r--r-- | ext/mbstring/mbstring.c | 36 | ||||
-rw-r--r-- | ext/mbstring/php_mbregex.c | 8 |
2 files changed, 22 insertions, 22 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index fe99d231ee..31b8a6251e 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -2106,7 +2106,7 @@ PHP_FUNCTION(mb_output_handler) { char *arg_string; int arg_string_len; - long arg_status; + php_int_t arg_status; mbfl_string string, result; const char *charset; char *p; @@ -2115,7 +2115,7 @@ PHP_FUNCTION(mb_output_handler) unsigned char send_text_mimetype = 0; char *s, *mimetype = NULL; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl", &arg_string, &arg_string_len, &arg_status) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "si", &arg_string, &arg_string_len, &arg_status) == FAILURE) { return; } @@ -2244,7 +2244,7 @@ PHP_FUNCTION(mb_strlen) PHP_FUNCTION(mb_strpos) { int n, reverse = 0; - long offset; + php_int_t offset; mbfl_string haystack, needle; char *enc_name = NULL; int enc_name_len; @@ -2257,7 +2257,7 @@ PHP_FUNCTION(mb_strpos) needle.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; offset = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|ls", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &offset, &enc_name, &enc_name_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|is", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &offset, &enc_name, &enc_name_len) == FAILURE) { return; } @@ -2406,14 +2406,14 @@ PHP_FUNCTION(mb_strrpos) PHP_FUNCTION(mb_stripos) { int n; - long offset; + php_int_t offset; mbfl_string haystack, needle; const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name; int from_encoding_len; n = -1; offset = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|ls", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|is", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) { return; } if (needle.len == 0) { @@ -2435,14 +2435,14 @@ PHP_FUNCTION(mb_stripos) PHP_FUNCTION(mb_strripos) { int n; - long offset; + php_int_t offset; mbfl_string haystack, needle; const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name; int from_encoding_len; n = -1; offset = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|ls", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|is", (char **)&haystack.val, (int *)&haystack.len, (char **)&needle.val, (int *)&needle.len, &offset, &from_encoding, &from_encoding_len) == FAILURE) { return; } @@ -2750,12 +2750,12 @@ PHP_FUNCTION(mb_substr) { size_t argc = ZEND_NUM_ARGS(); char *str, *encoding; - long from, len; + php_int_t from, len; int mblen, str_len, encoding_len; zval *z_len = NULL; mbfl_string string, result, *ret; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|zs", &str, &str_len, &from, &z_len, &encoding, &encoding_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "si|zs", &str, &str_len, &from, &z_len, &encoding, &encoding_len) == FAILURE) { return; } @@ -2829,7 +2829,7 @@ PHP_FUNCTION(mb_strcut) { size_t argc = ZEND_NUM_ARGS(); char *encoding; - long from, len; + php_int_t from, len; int encoding_len; zval *z_len = NULL; mbfl_string string, result, *ret; @@ -2838,7 +2838,7 @@ PHP_FUNCTION(mb_strcut) string.no_language = MBSTRG(language); string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|zs", (char **)&string.val, (int **)&string.len, &from, &z_len, &encoding, &encoding_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "si|zs", (char **)&string.val, (int **)&string.len, &from, &z_len, &encoding, &encoding_len) == FAILURE) { return; } @@ -2932,11 +2932,11 @@ PHP_FUNCTION(mb_strwidth) PHP_FUNCTION(mb_strimwidth) { char *str, *trimmarker, *encoding; - long from, width; + php_int_t from, width; int str_len, trimmarker_len, encoding_len; mbfl_string string, result, marker, *ret; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sll|ss", &str, &str_len, &from, &width, &trimmarker, &trimmarker_len, &encoding, &encoding_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sii|ss", &str, &str_len, &from, &width, &trimmarker, &trimmarker_len, &encoding, &encoding_len) == FAILURE) { return; } @@ -3148,12 +3148,12 @@ PHP_FUNCTION(mb_convert_case) const char *from_encoding = MBSTRG(current_internal_encoding)->mime_name; char *str; int str_len, from_encoding_len; - long case_mode = 0; + php_int_t case_mode = 0; char *newstr; size_t ret_len; RETVAL_FALSE; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|s!", &str, &str_len, + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "si|s!", &str, &str_len, &case_mode, &from_encoding, &from_encoding_len) == FAILURE) { return; } @@ -3356,13 +3356,13 @@ PHP_FUNCTION(mb_encode_mimeheader) int trans_enc_name_len; char *linefeed = "\r\n"; int linefeed_len; - long indent = 0; + php_int_t indent = 0; mbfl_string_init(&string); string.no_language = MBSTRG(language); string.no_encoding = MBSTRG(current_internal_encoding)->no_encoding; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sssl", (char **)&string.val, &string.len, &charset_name, &charset_name_len, &trans_enc_name, &trans_enc_name_len, &linefeed, &linefeed_len, &indent) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|sssi", (char **)&string.val, &string.len, &charset_name, &charset_name_len, &trans_enc_name, &trans_enc_name_len, &linefeed, &linefeed_len, &indent) == FAILURE) { return; } diff --git a/ext/mbstring/php_mbregex.c b/ext/mbstring/php_mbregex.c index 4c30eee8a9..baf0a2d44a 100644 --- a/ext/mbstring/php_mbregex.c +++ b/ext/mbstring/php_mbregex.c @@ -1060,9 +1060,9 @@ PHP_FUNCTION(mb_split) int string_len; int n, err; - long count = -1; + php_int_t 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|i", &arg_pattern, &arg_pattern_len, &string, &string_len, &count) == FAILURE) { RETURN_FALSE; } @@ -1397,9 +1397,9 @@ PHP_FUNCTION(mb_ereg_search_getpos) Set search start position */ PHP_FUNCTION(mb_ereg_search_setpos) { - long position; + php_int_t position; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l", &position) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "i", &position) == FAILURE) { return; } |