Skip to content

Commit 725f439

Browse files
committed
Suppress deprecation warning on IDNA2003 ICU methods
1 parent fcabe7e commit 725f439

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

ext/intl/idn/idn.c

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,11 +223,18 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
223223
UParseError parse_error;
224224

225225
status = U_ZERO_ERROR;
226+
#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
227+
# pragma GCC diagnostic push
228+
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
229+
#endif
226230
if (mode == INTL_IDN_TO_ASCII) {
227231
converted_ret_len = uidna_IDNToASCII(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
228232
} else {
229233
converted_ret_len = uidna_IDNToUnicode(ustring, ustring_len, converted, MAXPATHLEN, (int32_t)option, &parse_error, &status);
230234
}
235+
#if (ZEND_GCC_VERSION >= 4002) && !defined(__clang__)
236+
# pragma GCC diagnostic pop
237+
#endif
231238
efree(ustring);
232239

233240
if (U_FAILURE(status)) {

0 commit comments

Comments
 (0)