summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerick Rethans <derick@php.net>2004-11-23 09:45:33 +0000
committerDerick Rethans <derick@php.net>2004-11-23 09:45:33 +0000
commit68aff652b9d69b4e8dbf3a9f5d2c67d0b8b5b84c (patch)
tree9802e72348864cf5434978495408983b2707a9cb
parentaa06288173dfa07bf4d9e885bc54872a484eaac8 (diff)
downloadphp-git-68aff652b9d69b4e8dbf3a9f5d2c67d0b8b5b84c.tar.gz
- MFH: export "php_iconv_string()"
-rw-r--r--ext/iconv/iconv.c18
-rw-r--r--ext/iconv/php_iconv.h16
2 files changed, 17 insertions, 17 deletions
diff --git a/ext/iconv/iconv.c b/ext/iconv/iconv.c
index e0cb6c230e..ae03c705bf 100644
--- a/ext/iconv/iconv.c
+++ b/ext/iconv/iconv.c
@@ -106,20 +106,6 @@ ZEND_GET_MODULE(iconv)
#define iconv libiconv
#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_MALFORMED = 7,
- PHP_ICONV_ERR_ALLOC = 8
-} php_iconv_err_t;
-/* }}} */
-
/* {{{ typedef enum php_iconv_enc_scheme_t */
typedef enum _php_iconv_enc_scheme_t {
PHP_ICONV_ENC_SCHEME_BASE64,
@@ -134,8 +120,6 @@ typedef enum _php_iconv_enc_scheme_t {
static php_iconv_err_t _php_iconv_appendl(smart_str *d, const char *s, size_t l, iconv_t cd);
static php_iconv_err_t _php_iconv_appendc(smart_str *d, const char c, iconv_t cd);
-static php_iconv_err_t php_iconv_string(const char * in_p, size_t in_len, char **out, size_t *out_len, const char *out_charset, const char *in_charset);
-
static void _php_iconv_show_error(php_iconv_err_t err, const char *out_charset, const char *in_charset TSRMLS_DC);
static php_iconv_err_t _php_iconv_strlen(unsigned int *pretval, const char *str, size_t nbytes, const char *enc);
@@ -335,7 +319,7 @@ static php_iconv_err_t _php_iconv_appendc(smart_str *d, const char c, iconv_t cd
/* {{{ 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 *out_charset, const char *in_charset)
{
diff --git a/ext/iconv/php_iconv.h b/ext/iconv/php_iconv.h
index 7479560cf1..fbe4404bb6 100644
--- a/ext/iconv/php_iconv.h
+++ b/ext/iconv/php_iconv.h
@@ -75,6 +75,22 @@ 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_MALFORMED = 7,
+ PHP_ICONV_ERR_ALLOC = 8
+} 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