summaryrefslogtreecommitdiff
path: root/ext/zlib/zlib.c
diff options
context:
space:
mode:
authorMichael Wallner <mike@php.net>2006-08-31 13:51:35 +0000
committerMichael Wallner <mike@php.net>2006-08-31 13:51:35 +0000
commitdf26ea87bdc7aae1ade1189027a571b25968e17b (patch)
tree56435eb65538fd2925daf5d8806f9c329e912fb7 /ext/zlib/zlib.c
parent3aca07552aab48e1433d6467071c51bf8ca7fd0f (diff)
downloadphp-git-df26ea87bdc7aae1ade1189027a571b25968e17b.tar.gz
- output handler alias ctor should know about chunk_size and flags
Diffstat (limited to 'ext/zlib/zlib.c')
-rw-r--r--ext/zlib/zlib.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ext/zlib/zlib.c b/ext/zlib/zlib.c
index e0b4060c3a..8e20190b05 100644
--- a/ext/zlib/zlib.c
+++ b/ext/zlib/zlib.c
@@ -85,7 +85,8 @@ void php_zlib_output_compression_start(TSRMLS_D)
default:
MAKE_STD_ZVAL(tmp);
ZVAL_ASCII_STRING(tmp, PHP_ZLIB_OUTPUT_HANDLER_NAME, ZSTR_DUPLICATE);
- if ((h = php_zlib_output_handler_init(tmp TSRMLS_CC)) && (SUCCESS == php_output_handler_start(h TSRMLS_CC))) {
+ if ( (h = php_zlib_output_handler_init(tmp, ZLIBG(output_compression), PHP_OUTPUT_HANDLER_STDFLAGS TSRMLS_CC)) &&
+ (SUCCESS == php_output_handler_start(h TSRMLS_CC))) {
if (ZLIBG(output_handler) && *ZLIBG(output_handler)) {
MAKE_STD_ZVAL(zoh);
ZVAL_ASCII_STRING(zoh, ZLIBG(output_handler), ZSTR_DUPLICATE);
@@ -100,12 +101,12 @@ void php_zlib_output_compression_start(TSRMLS_D)
/* }}} */
/* {{{ php_zlib_output_handler_init() */
-php_output_handler *php_zlib_output_handler_init(zval *handler_name TSRMLS_DC)
+php_output_handler *php_zlib_output_handler_init(zval *handler_name, size_t chunk_size, int flags TSRMLS_DC)
{
php_output_handler *h = NULL;
if (php_zlib_output_encoding(TSRMLS_C)) {
- if ((h = php_output_handler_create_internal(handler_name, php_zlib_output_handler, ZLIBG(output_compression), PHP_OUTPUT_HANDLER_STDFLAGS TSRMLS_CC))) {
+ if ((h = php_output_handler_create_internal(handler_name, php_zlib_output_handler, chunk_size, flags TSRMLS_CC))) {
php_output_handler_set_context(h, ecalloc(1, sizeof(php_zlib_context)), php_zlib_output_handler_dtor TSRMLS_CC);
}
}