mirror of
https://github.com/php/php-src.git
synced 2025-08-15 21:48:51 +02:00
- Export "php_iconv_string()".
This commit is contained in:
parent
a6ded1178e
commit
ce022d2723
2 changed files with 17 additions and 17 deletions
|
@ -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)
|
||||
{
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue