From: Michael Wallner Date: Mon, 5 Mar 2018 10:52:49 +0000 (+0100) Subject: use u_isalnum if available X-Git-Tag: RELEASE_3_2_0_RC1~5 X-Git-Url: https://git.m6w6.name/?a=commitdiff_plain;h=68359d47e9dd6680697835ba5643d871d759b069;hp=f9174a9d53c215c201989aee1d57a5bc818d084f;p=m6w6%2Fext-http use u_isalnum if available --- diff --git a/src/php_http_url.c b/src/php_http_url.c index ad4f14c..71ca6e9 100644 --- a/src/php_http_url.c +++ b/src/php_http_url.c @@ -19,6 +19,7 @@ # include #endif #if PHP_HTTP_HAVE_LIBICU +# include # include #endif #if PHP_HTTP_HAVE_LIBIDNKIT || PHP_HTTP_HAVE_LIBIDNKIT2 @@ -742,7 +743,11 @@ static inline size_t parse_mb(struct parse_state *state, parse_mb_what_t what, c if (what == PARSE_HOSTINFO && (state->flags & PHP_HTTP_URL_PARSE_TOIDN)) { /* idna */ } else if (state->flags & PHP_HTTP_URL_PARSE_MBUTF8) { +#if PHP_HTTP_HAVE_LIBICU + if (!u_isalnum(wchar)) { +#else if (!isualnum(wchar)) { +#endif break; } #if PHP_HTTP_HAVE_WCHAR