8000 Expose the xml_utf8_encode function. · php/php-src@e79e9fa · GitHub
[go: up one dir, main page]

Skip to content

Commit e79e9fa

Browse files
author
Ilia Alshanetsky
committed
Expose the xml_utf8_encode function.
1 parent e5635a8 commit e79e9fa

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

ext/xml/php_xml.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ PHP_FUNCTION(xml_parse_into_struct);
141141

142142
PHPAPI char *_xml_zval_strdup(zval *val);
143143
PHPAPI char *xml_utf8_decode(const XML_Char *, int, int *, const XML_Char *);
144+
PHPAPI char *xml_utf8_encode(const char *s, int len, int *newlen, const XML_Char *encoding);
144145

145146
#endif /* HAVE_LIBEXPAT */
146147

ext/xml/xml.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ inline static unsigned short xml_encode_iso_8859_1(unsigned char);
7979
inline static char xml_decode_iso_8859_1(unsigned short);
8080
inline static unsigned short xml_encode_us_ascii(unsigned char);
8181
inline static char xml_decode_us_ascii(unsigned short);
82-
static XML_Char *xml_utf8_encode(const char *, int, int *, const XML_Char *);
8382
static zval *xml_call_handler(xml_parser *, zval *, zend_function *, int, zval **);
8483
static zval *_xml_xmlchar_zval(const XML_Char *, int, const XML_Char *);
8584
static int _xml_xmlcharlen(const XML_Char *);
@@ -497,7 +496,7 @@ static xml_encoding *xml_get_encoding(const XML_Char *name)
497496
/* }}} */
498497

499498
/* {{{ xml_utf8_encode */
500-
static XML_Char *xml_utf8_encode(const char *s, int len, int *newlen, const XML_Char *encoding)
499+
PHPAPI char *xml_utf8_encode(const char *s, int len, int *newlen, const XML_Char *encoding)
501500
{
502501
int pos = len;
503502
char *newbuf;

0 commit comments

Comments
 (0)
0