From e99d47a3aabf9879f0326bf5d52d176921de63e1 Mon Sep 17 00:00:00 2001 From: Moriyoshi Koizumi Date: Wed, 4 Jun 2003 14:29:53 +0000 Subject: [PATCH] MFH(r-1.87): fixed ob_iconv_handler() type mismatch issue on 64bit platforms. --- ext/iconv/iconv.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index 192daa6cd3..284239c95d 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -193,11 +193,10 @@ php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len, const char *in_charset, const char *out_charset) { #if !ICONV_SUPPORTS_ERRNO - unsigned int in_size, out_size, out_left; + size_t in_size, out_size, out_left; char *out_buffer, *out_p; iconv_t cd; size_t result; - typedef unsigned int ucs4_t; *out = NULL; *out_len = 0; @@ -209,7 +208,7 @@ php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len, a single char can be more than 4 bytes. I added 15 extra bytes for safety. */ - out_size = in_len * sizeof(ucs4_t) + 15; + out_size = in_len * sizeof(int) + 15; out_left = out_size; in_size = in_len; @@ -427,7 +426,7 @@ PHP_FUNCTION(ob_iconv_handler) { char *out_buffer, *content_type, *mimetype = NULL, *s; zval *zv_string; - unsigned int out_len; + size_t out_len; int mimetype_alloced = 0; long status; -- 2.40.0