diff options
| author | Derick Rethans <derick@php.net> | 2004-11-23 09:45:23 +0000 |
|---|---|---|
| committer | Derick Rethans <derick@php.net> | 2004-11-23 09:45:23 +0000 |
| commit | fc627a4fa1ad3196c03efb67a721f63c9fec128c (patch) | |
| tree | 1dc32c4f81b15de23a6d463240fabe2bffeaf42a | |
| parent | 0a2b8eb9919964e7ad1fa6d5f458c0fa05f82a40 (diff) | |
| download | php-git-fc627a4fa1ad3196c03efb67a721f63c9fec128c.tar.gz | |
- MFH: export "php_iconv_string()"
| -rw-r--r-- | ext/iconv/iconv.c | 15 | ||||
| -rw-r--r-- | ext/iconv/php_iconv.h | 14 |
2 files changed, 15 insertions, 14 deletions
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 |
