com php-src: adapted all the function arg formats in ext/zlib: ext/zlib/zlib.c

From: Date: Wed, 16 Oct 2013 10:14:13 +0000
Subject: com php-src: adapted all the function arg formats in ext/zlib: ext/zlib/zlib.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-73463@lists.php.net to get a copy of this message
Commit: af4924eaea90ab87cef57c3cd49acc79a2e02ebb Author: Anatol Belski <ab@php.net> Fri, 23 Aug 2013 04:21:02 -0700 Parents: 1015a29997349303177ebf5f5c0b48de375048c3 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=af4924eaea90ab87cef57c3cd49acc79a2e02ebb Log: adapted all the function arg formats in ext/zlib Changed paths: M ext/zlib/zlib.c Diff: diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 1114bc8..f8e7819 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -448,7 +448,7 @@ static void php_zlib_cleanup_ob_gzhandler_mess(TSRMLS_D) static PHP_FUNCTION(ob_gzhandler) { char *in_str; - int in_len; + zend_str_size_int in_len; long flags = 0; php_output_context ctx = {0}; int encoding, rv; @@ -461,7 +461,7 @@ static PHP_FUNCTION(ob_gzhandler) * - OG(running) is not set or set to any other output handler * - we have to mess around with php_output_context */ - if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl", &in_str, &in_len, &flags)) { + if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sl", &in_str, &in_len, &flags)) { RETURN_FALSE; } @@ -534,14 +534,14 @@ static PHP_FUNCTION(zlib_get_coding_type) static PHP_FUNCTION(gzfile) { char *filename; - int filename_len; + zend_str_size_int filename_len; int flags = REPORT_ERRORS; char buf[8192] = {0}; register int i = 0; long use_include_path = 0; php_stream *stream; - if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "p|l", &filename, &filename_len, &use_include_path)) { + if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "P|l", &filename, &filename_len, &use_include_path)) { return; } @@ -576,12 +576,12 @@ static PHP_FUNCTION(gzopen) { char *filename; char *mode; - int filename_len, mode_len; + zend_str_size_int filename_len, mode_len; int flags = REPORT_ERRORS; php_stream *stream; long use_include_path = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ss|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "SS|l", &filename, &filename_len, &mode, &mode_len, &use_include_path) == FAILURE) { return; } @@ -603,13 +603,13 @@ static PHP_FUNCTION(gzopen) static PHP_FUNCTION(readgzfile) { char *filename; - int filename_len; + zend_str_size_int filename_len; int flags = REPORT_ERRORS; php_stream *stream; int size; long use_include_path = 0; - if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &filename, &filename_len, &use_include_path) == FAILURE) { + if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &filename, &filename_len, &use_include_path) == FAILURE) { return; } @@ -632,16 +632,16 @@ static PHP_FUNCTION(readgzfile) static PHP_FUNCTION(name) \ { \ char *in_buf, *out_buf; \ - int in_len; \ + zend_str_size_int in_len; \ size_t out_len; \ long level = -1; \ long encoding = default_encoding; \ if (default_encoding) { \ - if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|ll", &in_buf, &in_len, &level, &encoding)) { \ + if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|ll", &in_buf, &in_len, &level, &encoding)) { \ return; \ } \ } else { \ - if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl|l", &in_buf, &in_len, &encoding, &level)) { \ + if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "Sl|l", &in_buf, &in_len, &encoding, &level)) { \ return; \ } \ } \ @@ -668,10 +668,10 @@ static PHP_FUNCTION(name) \ static PHP_FUNCTION(name) \ { \ char *in_buf, *out_buf; \ - int in_len; \ + zend_str_size_int in_len; \ size_t out_len; \ long max_len = 0; \ - if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &in_buf, &in_len, &max_len)) { \ + if (SUCCESS != zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|l", &in_buf, &in_len, &max_len)) { \ return; \ } \ if (max_len < 0) { \

« previous php.cvs (#73463) next »