summaryrefslogtreecommitdiff
path: root/ext/standard/html.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/standard/html.c')
-rw-r--r--ext/standard/html.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/ext/standard/html.c b/ext/standard/html.c
index 354e18bfec..de763cf72a 100644
--- a/ext/standard/html.c
+++ b/ext/standard/html.c
@@ -92,9 +92,9 @@ ZEND_EXTERN_MODULE_GLOBALS(mbstring)
/* {{{ get_next_char
*/
-static unsigned int get_next_char(
+static inline unsigned int get_next_char(
enum entity_charset charset,
- unsigned char *str,
+ const unsigned char *str,
size_t str_len,
size_t *cursor,
int *status)
@@ -352,6 +352,18 @@ static unsigned int get_next_char(
}
/* }}} */
+/* {{{ php_next_utf8_char
+ * Public interface for get_next_char used with UTF-8 */
+ PHPAPI unsigned int php_next_utf8_char(
+ const unsigned char *str,
+ size_t str_len,
+ size_t *cursor,
+ int *status)
+{
+ return get_next_char(cs_utf_8, str, str_len, cursor, status);
+}
+/* }}} */
+
/* {{{ entity_charset determine_charset
* returns the charset identifier based on current locale or a hint.
* defaults to UTF-8 */