com php-src: remaining fixes to ext/zlib: ext/zlib/php_zlib .h ext/zlib/zlib.c

From: Date: Fri, 06 Dec 2013 10:42:30 +0000
Subject: com php-src: remaining fixes to ext/zlib: ext/zlib/php_zlib .h ext/zlib/zlib.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-74298@lists.php.net to get a copy of this message
Commit: 9510451fb1f7518598bd8a16b14472955632ea85 Author: Anatol Belski <ab@php.net> Fri, 6 Dec 2013 11:42:30 +0100 Parents: adb1e38468dcd50219c594ff2f71bb4d27ee01a4 Branches: str_size_and_int64 Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9510451fb1f7518598bd8a16b14472955632ea85 Log: remaining fixes to ext/zlib datatypes for globals %pd format Changed paths: M ext/zlib/php_zlib.h M ext/zlib/zlib.c Diff: diff --git a/ext/zlib/php_zlib.h b/ext/zlib/php_zlib.h index 3e4b938..34a786e 100644 --- a/ext/zlib/php_zlib.h +++ b/ext/zlib/php_zlib.h @@ -50,11 +50,11 @@ typedef struct _php_zlib_context { ZEND_BEGIN_MODULE_GLOBALS(zlib) /* variables for transparent gzip encoding */ int compression_coding; - long output_compression; - long output_compression_level; + php_int_t output_compression; + php_int_t output_compression_level; char *output_handler; php_zlib_context *ob_gzhandler; - long output_compression_default; + php_int_t output_compression_default; zend_bool handler_registered; ZEND_END_MODULE_GLOBALS(zlib); diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c index 496d679..dcd850b 100644 --- a/ext/zlib/zlib.c +++ b/ext/zlib/zlib.c @@ -606,7 +606,7 @@ static PHP_FUNCTION(readgzfile) zend_str_size_int filename_len; int flags = REPORT_ERRORS; php_stream *stream; - int size; + zend_str_size_int size; php_int_t use_include_path = 0; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "S|i", &filename, &filename_len, &use_include_path) == FAILURE) { @@ -633,7 +633,7 @@ static PHP_FUNCTION(name) \ { \ char *in_buf, *out_buf; \ zend_str_size_int in_len; \ - size_t out_len; \ + zend_str_size_size_t out_len; \ php_int_t level = -1; \ php_int_t encoding = default_encoding; \ if (default_encoding) { \ @@ -646,7 +646,7 @@ static PHP_FUNCTION(name) \ } \ } \ if (level < -1 || level > 9) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "compression level (%ld) must be within -1..9", level); \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "compression level (%pd) must be within -1..9", level); \ RETURN_FALSE; \ } \ switch (encoding) { \ @@ -675,7 +675,7 @@ static PHP_FUNCTION(name) \ return; \ } \ if (max_len < 0) { \ - php_error_docref(NULL TSRMLS_CC, E_WARNING, "length (%ld) must be greater or equal zero", max_len); \ + php_error_docref(NULL TSRMLS_CC, E_WARNING, "length (%pd) must be greater or equal zero", max_len); \ RETURN_FALSE; \ } \ if (SUCCESS != php_zlib_decode(in_buf, in_len, &out_buf, &out_len, encoding, max_len TSRMLS_CC)) { \

« previous php.cvs (#74298) next »