diff options
| author | Antony Dovgal <tony2001@php.net> | 2006-08-31 16:15:24 +0000 |
|---|---|---|
| committer | Antony Dovgal <tony2001@php.net> | 2006-08-31 16:15:24 +0000 |
| commit | 75b8cd741ba23dbf1ae75b50484d69d1aa70e7f3 (patch) | |
| tree | 156e407d75b817b93b87b74690d0b0fac7ac79c4 /ext/mbstring | |
| parent | 50e9994b2c36eae24de34c4c5088f4bd9686fe07 (diff) | |
| download | php-git-75b8cd741ba23dbf1ae75b50484d69d1aa70e7f3.tar.gz | |
last portion of z/Z fixes
Diffstat (limited to 'ext/mbstring')
| -rw-r--r-- | ext/mbstring/mbstring.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/ext/mbstring/mbstring.c b/ext/mbstring/mbstring.c index 457877c7dd..22c48779d4 100644 --- a/ext/mbstring/mbstring.c +++ b/ext/mbstring/mbstring.c @@ -1645,7 +1645,7 @@ PHP_FUNCTION(mb_strrpos) mbfl_string haystack, needle; char *enc_name = NULL; int enc_name_len; - zval *zoffset; + zval **zoffset; long offset = 0, str_flg; char *enc_name2 = NULL; int enc_name_len2; @@ -1657,14 +1657,14 @@ PHP_FUNCTION(mb_strrpos) needle.no_language = MBSTRG(current_language); needle.no_encoding = MBSTRG(current_internal_encoding); - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|zs", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &zoffset, &enc_name, &enc_name_len) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|Zs", (char **)&haystack.val, &haystack.len, (char **)&needle.val, &needle.len, &zoffset, &enc_name, &enc_name_len) == FAILURE) { RETURN_FALSE; } if(ZEND_NUM_ARGS() >= 3) { - if (Z_TYPE_P(zoffset) == IS_STRING) { - enc_name2 = Z_STRVAL_P(zoffset); - enc_name_len2 = Z_STRLEN_P(zoffset); + if (Z_TYPE_PP(zoffset) == IS_STRING) { + enc_name2 = Z_STRVAL_PP(zoffset); + enc_name_len2 = Z_STRLEN_PP(zoffset); str_flg = 1; if (enc_name2 != NULL) { @@ -1690,15 +1690,15 @@ PHP_FUNCTION(mb_strrpos) } if(str_flg) { - convert_to_long(zoffset); - offset = Z_LVAL_P(zoffset); + convert_to_long_ex(zoffset); + offset = Z_LVAL_PP(zoffset); } else { enc_name = enc_name2; enc_name_len = enc_name_len2; } } else { - convert_to_long(zoffset); - offset = Z_LVAL_P(zoffset); + convert_to_long_ex(zoffset); + offset = Z_LVAL_PP(zoffset); } } |
