cvs: php4 /ext/iconv iconv.c
| From: | Rui Hirokawa | Date: | Fri, 04 May 2001 03:55:48 +0000 |
| Subject: | cvs: php4 /ext/iconv iconv.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-5517@lists.php.net to get a copy of this message | ||
hirokawa Thu May 3 20:55:48 2001 EDT
Modified files:
/php4/ext/iconv iconv.c
Log:
added status parameter to output handler in ext/iconv.
Index: php4/ext/iconv/iconv.c
diff -u php4/ext/iconv/iconv.c:1.11 php4/ext/iconv/iconv.c:1.12
--- php4/ext/iconv/iconv.c:1.11 Wed Apr 18 21:02:03 2001
+++ php4/ext/iconv/iconv.c Thu May 3 20:55:48 2001
@@ -24,8 +24,8 @@
#include "php_iconv.h"
#include "ext/standard/info.h"
+#include "ext/standard/php_output.h"
-
ZEND_DECLARE_MODULE_GLOBALS(iconv)
#if HAVE_LIBICONV
@@ -171,19 +171,22 @@
}
/* }}} */
-/* {{{ 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,