From: Derick Rethans Date: Tue, 23 Nov 2004 09:45:23 +0000 (+0000) Subject: - MFH: export "php_iconv_string()" X-Git-Tag: php-4.3.10RC1~4 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fc627a4fa1ad3196c03efb67a721f63c9fec128c;p=php - MFH: export "php_iconv_string()" --- diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c index e4061f52bf..d6fe4d34e4 100644 --- a/ext/iconv/iconv.c +++ b/ext/iconv/iconv.c @@ -83,24 +83,11 @@ ZEND_DECLARE_MODULE_GLOBALS(iconv) ZEND_GET_MODULE(iconv) #endif -/* {{{ typedef enum php_iconv_err_t */ -typedef enum _php_iconv_err_t { - PHP_ICONV_ERR_SUCCESS = SUCCESS, - PHP_ICONV_ERR_CONVERTER = 1, - PHP_ICONV_ERR_WRONG_CHARSET = 2, - PHP_ICONV_ERR_TOO_BIG = 3, - PHP_ICONV_ERR_ILLEGAL_SEQ = 4, - PHP_ICONV_ERR_ILLEGAL_CHAR = 5, - PHP_ICONV_ERR_UNKNOWN = 6 -} php_iconv_err_t; -/* }}} */ - #ifdef HAVE_LIBICONV #define iconv libiconv #endif /* {{{ prototypes */ -static php_iconv_err_t php_iconv_string(const char * in_p, size_t in_len, char **out, size_t *out_len, const char *in_charset, const char *out_charset); static void _php_iconv_show_error(php_iconv_err_t err, const char *in_charset, const char *out_charset TSRMLS_DC); /* }}} */ @@ -185,7 +172,7 @@ PHP_MINFO_FUNCTION(miconv) /* {{{ php_iconv_string */ -php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len, +PHP_ICONV_API php_iconv_err_t php_iconv_string(const char *in_p, size_t in_len, char **out, size_t *out_len, const char *in_charset, const char *out_charset) { diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h index cd6fe83a25..173c709a1d 100644 --- a/ext/iconv/php_iconv.h +++ b/ext/iconv/php_iconv.h @@ -68,6 +68,20 @@ ZEND_END_MODULE_GLOBALS(iconv) #define ICONV_OUTPUT_ENCODING "ISO-8859-1" #define ICONV_INTERNAL_ENCODING "ISO-8859-1" +/* {{{ typedef enum php_iconv_err_t */ +typedef enum _php_iconv_err_t { + PHP_ICONV_ERR_SUCCESS = SUCCESS, + PHP_ICONV_ERR_CONVERTER = 1, + PHP_ICONV_ERR_WRONG_CHARSET = 2, + PHP_ICONV_ERR_TOO_BIG = 3, + PHP_ICONV_ERR_ILLEGAL_SEQ = 4, + PHP_ICONV_ERR_ILLEGAL_CHAR = 5, + PHP_ICONV_ERR_UNKNOWN = 6 +} php_iconv_err_t; +/* }}} */ + +PHP_ICONV_API php_iconv_err_t php_iconv_string(const char * in_p, size_t in_len, char **out, size_t *out_len, const char *in_charset, const char *out_charset); + #else #define iconv_module_ptr NULL