diff options
| author | Rui Hirokawa <hirokawa@php.net> | 2001-05-04 03:55:48 +0000 |
|---|---|---|
| committer | Rui Hirokawa <hirokawa@php.net> | 2001-05-04 03:55:48 +0000 |
| commit | 93e75216393b95f8ae73f8bdc9d1d65c3903f183 (patch) | |
| tree | 6d06fc79881b0b193fb6e475a7e9c3a079fa5bcf /ext | |
| parent | 8405c36815967e1e7b8812de1fc31a8c465197a3 (diff) | |
| download | php-git-93e75216393b95f8ae73f8bdc9d1d65c3903f183.tar.gz | |
added status parameter to output handler in ext/iconv.
Diffstat (limited to 'ext')
| -rw-r--r-- | ext/iconv/iconv.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index f93a41392e..ff98e204a3 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -24,7 +24,7 @@ #include "php_iconv.h" #include "ext/standard/info.h" - +#include "ext/standard/php_output.h" ZEND_DECLARE_MODULE_GLOBALS(iconv) @@ -171,20 +171,23 @@ PHP_FUNCTION(iconv) } /* }}} */ -/* {{{ proto string ob_iconv_handler(string contents) +/* {{{ proto string ob_iconv_handler(string contents, int status) Returns str in output buffer converted to the iconv.output_encoding character set */ PHP_FUNCTION(ob_iconv_handler) { int coding; char *out_buffer; - zval **zv_string; + zval **zv_string, **zv_status; SLS_FETCH(); ICONVLS_FETCH(); - if (ZEND_NUM_ARGS()!=1 || zend_get_parameters_ex(1, &zv_string)==FAILURE) { + if (ZEND_NUM_ARGS()!=2 || zend_get_parameters_ex(2, &zv_string, &zv_status)==FAILURE) { ZEND_WRONG_PARAM_COUNT(); } + convert_to_string_ex(zv_string); + convert_to_long_ex(zv_status); + if (SG(sapi_headers).send_default_content_type && php_iconv_string(Z_STRVAL_PP(zv_string), &out_buffer, ICONVG(internal_encoding), |
