summaryrefslogtreecommitdiff
path: root/ext/intl/idn/idn.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/idn/idn.c')
-rw-r--r--ext/intl/idn/idn.c42
1 files changed, 21 insertions, 21 deletions
diff --git a/ext/intl/idn/idn.c b/ext/intl/idn/idn.c
index 1d07dbba80..0848be94a7 100644
--- a/ext/intl/idn/idn.c
+++ b/ext/intl/idn/idn.c
@@ -111,15 +111,15 @@ enum {
};
/* like INTL_CHECK_STATUS, but as a function and varying the name of the func */
-static int php_intl_idn_check_status(UErrorCode err, const char *msg, int mode TSRMLS_DC)
+static int php_intl_idn_check_status(UErrorCode err, const char *msg, int mode)
{
- intl_error_set_code(NULL, err TSRMLS_CC);
+ intl_error_set_code(NULL, err);
if (U_FAILURE(err)) {
char *buff;
spprintf(&buff, 0, "%s: %s",
mode == INTL_IDN_TO_ASCII ? "idn_to_ascii" : "idn_to_utf8",
msg);
- intl_error_set_custom_msg(NULL, buff, 1 TSRMLS_CC);
+ intl_error_set_custom_msg(NULL, buff, 1);
efree(buff);
return FAILURE;
}
@@ -127,9 +127,9 @@ static int php_intl_idn_check_status(UErrorCode err, const char *msg, int mode T
return SUCCESS;
}
-static inline void php_intl_bad_args(const char *msg, int mode TSRMLS_DC)
+static inline void php_intl_bad_args(const char *msg, int mode)
{
- php_intl_idn_check_status(U_ILLEGAL_ARGUMENT_ERROR, msg, mode TSRMLS_CC);
+ php_intl_idn_check_status(U_ILLEGAL_ARGUMENT_ERROR, msg, mode);
}
#ifdef HAVE_46_API
@@ -146,7 +146,7 @@ static void php_intl_idn_to_46(INTERNAL_FUNCTION_PARAMETERS,
uts46 = uidna_openUTS46(option, &status);
if (php_intl_idn_check_status(status, "failed to open UIDNA instance",
- mode TSRMLS_CC) == FAILURE) {
+ mode) == FAILURE) {
zend_string_free(buffer);
RETURN_FALSE;
}
@@ -159,13 +159,13 @@ static void php_intl_idn_to_46(INTERNAL_FUNCTION_PARAMETERS,
buffer->val, buffer_capac, &info, &status);
}
if (php_intl_idn_check_status(status, "failed to convert name",
- mode TSRMLS_CC) == FAILURE) {
+ mode) == FAILURE) {
uidna_close(uts46);
zend_string_free(buffer);
RETURN_FALSE;
}
if (len >= 255) {
- php_error_docref(NULL TSRMLS_CC, E_ERROR, "ICU returned an unexpected length");
+ php_error_docref(NULL, E_ERROR, "ICU returned an unexpected length");
}
buffer->val[len] = '\0';
@@ -217,10 +217,10 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
intl_convert_utf8_to_utf16(&ustring, &ustring_len, domain, domain_len, &status);
if (U_FAILURE(status)) {
- intl_error_set_code(NULL, status TSRMLS_CC);
+ intl_error_set_code(NULL, status);
/* Set error messages. */
- intl_error_set_custom_msg( NULL, "Error converting input string to UTF-16", 0 TSRMLS_CC );
+ intl_error_set_custom_msg( NULL, "Error converting input string to UTF-16", 0 );
if (ustring) {
efree(ustring);
}
@@ -237,7 +237,7 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
efree(ustring);
if (U_FAILURE(status)) {
- intl_error_set( NULL, status, "idn_to_ascii: cannot convert to ASCII", 0 TSRMLS_CC );
+ intl_error_set( NULL, status, "idn_to_ascii: cannot convert to ASCII", 0 );
RETURN_FALSE;
}
@@ -246,10 +246,10 @@ static void php_intl_idn_to(INTERNAL_FUNCTION_PARAMETERS,
if (U_FAILURE(status)) {
/* Set global error code. */
- intl_error_set_code(NULL, status TSRMLS_CC);
+ intl_error_set_code(NULL, status);
/* Set error messages. */
- intl_error_set_custom_msg( NULL, "Error converting output string to UTF-8", 0 TSRMLS_CC );
+ intl_error_set_custom_msg( NULL, "Error converting output string to UTF-8", 0 );
efree(converted_utf8);
RETURN_FALSE;
}
@@ -269,42 +269,42 @@ static void php_intl_idn_handoff(INTERNAL_FUNCTION_PARAMETERS, int mode)
variant = INTL_IDN_VARIANT_2003;
zval *idna_info = NULL;
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|llz/",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|llz/",
&domain, &domain_len, &option, &variant, &idna_info) == FAILURE) {
- php_intl_bad_args("bad arguments", mode TSRMLS_CC);
+ php_intl_bad_args("bad arguments", mode);
RETURN_NULL(); /* don't set FALSE because that's not the way it was before... */
}
#ifdef HAVE_46_API
if (variant != INTL_IDN_VARIANT_2003 && variant != INTL_IDN_VARIANT_UTS46) {
php_intl_bad_args("invalid variant, must be one of {"
- "INTL_IDNA_VARIANT_2003, INTL_IDNA_VARIANT_UTS46}", mode TSRMLS_CC);
+ "INTL_IDNA_VARIANT_2003, INTL_IDNA_VARIANT_UTS46}", mode);
RETURN_FALSE;
}
#else
if (variant != INTL_IDN_VARIANT_2003) {
php_intl_bad_args("invalid variant, PHP was compiled against "
"an old version of ICU and only supports INTL_IDN_VARIANT_2003",
- mode TSRMLS_CC);
+ mode);
RETURN_FALSE;
}
#endif
if (domain_len < 1) {
- php_intl_bad_args("empty domain name", mode TSRMLS_CC);
+ php_intl_bad_args("empty domain name", mode);
RETURN_FALSE;
}
if (domain_len > INT32_MAX - 1) {
- php_intl_bad_args("domain name too large", mode TSRMLS_CC);
+ php_intl_bad_args("domain name too large", mode);
RETURN_FALSE;
}
/* don't check options; it wasn't checked before */
if (idna_info != NULL) {
if (variant == INTL_IDN_VARIANT_2003) {
- php_error_docref0(NULL TSRMLS_CC, E_NOTICE,
+ php_error_docref0(NULL, E_NOTICE,
"4 arguments were provided, but INTL_IDNA_VARIANT_2003 only "
"takes 3 - extra argument ignored");
} else {