com php-src: Revert "Move to non deprecated API on suitable ICU versions": NEWS ext/intl/idn/idn.c

From: Date: Fri, 16 Aug 2019 15:39:05 +0000
Subject: com php-src: Revert "Move to non deprecated API on suitable ICU versions": NEWS ext/intl/idn/idn.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-107945@lists.php.net to get a copy of this message
Commit: 9b9814fa774eb9e4b8c51721324e708e2b1aa30e Author: Sara Golemon <pollita@php.net> Fri, 16 Aug 2019 11:25:33 -0400 Parents: 49666474435ff0db2f96fcb00fb04ff7fcfcec57 Branches: PHP-7.3 PHP-7.4 master Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=9b9814fa774eb9e4b8c51721324e708e2b1aa30e Log: Revert "Move to non deprecated API on suitable ICU versions" This reverts commit 13a2f2d041999dca0066542f2a552798fab9a13d. The APIs used by this commit aren't entirely equivalent to the original ones. Changed paths: M NEWS M ext/intl/idn/idn.c Diff: diff --git a/NEWS b/NEWS index 6248adf..07bd891 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ PHP NEWS ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||| ?? ??? ????, PHP 7.3.10 +- Intl: + . Ensure IDNA2003 rules are used with idn_to_ascii() and idn_to_utf8() + when requested. (Sara) + 29 Aug 2019, PHP 7.3.9 - Core: diff --git a/ext/intl/idn/idn.c b/ext/intl/idn/idn.c index bd87afc..fc83f79 100644 --- a/ext/intl/idn/idn.c +++ b/ext/intl/idn/idn.c @@ -224,34 +224,16 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS, } RETURN_FALSE; } else { + UParseError parse_error; UChar converted[MAXPATHLEN]; int32_t converted_ret_len; status = U_ZERO_ERROR; - -#if U_ICU_VERSION_MAJOR_NUM >= 55 - UIDNAInfo info = UIDNA_INFO_INITIALIZER; - UIDNA *idna = uidna_openUTS46((int32_t)option, &status); - - if (U_FAILURE(status)) { - intl_error_set( NULL, status, "idn_to_ascii: failed to create an UIDNA instance", 0 ); - RETURN_FALSE; - } - - if (mode == INTL_IDN_TO_ASCII) { - converted_ret_len = uidna_nameToASCII(idna, ustring, ustring_len, converted, MAXPATHLEN, &info, &status); - } else { - converted_ret_len = uidna_nameToUnicode(idna, ustring, ustring_len, converted, MAXPATHLEN, &info, &status); - } - uidna_close(idna); -#else - UParseError parse_error; if (mode == INTL_IDN_TO_ASCII) { converted_ret_len = uidna_IDNToASCII(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status); } else { converted_ret_len = uidna_IDNToUnicode(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status); } -#endif efree(ustring); if (U_FAILURE(status)) {

« previous php.cvs (#107945) next »