summaryrefslogtreecommitdiff
path: root/ext/intl/calendar/calendar_methods.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/calendar/calendar_methods.cpp')
-rw-r--r--ext/intl/calendar/calendar_methods.cpp272
1 files changed, 136 insertions, 136 deletions
diff --git a/ext/intl/calendar/calendar_methods.cpp b/ext/intl/calendar/calendar_methods.cpp
index eaa1930e42..da338db46b 100644
--- a/ext/intl/calendar/calendar_methods.cpp
+++ b/ext/intl/calendar/calendar_methods.cpp
@@ -44,7 +44,7 @@ U_CFUNC PHP_METHOD(IntlCalendar, __construct)
{
zend_throw_exception( NULL,
"An object of this type cannot be created with the new operator",
- 0 TSRMLS_CC );
+ 0 );
}
U_CFUNC PHP_FUNCTION(intlcal_create_instance)
@@ -54,34 +54,34 @@ U_CFUNC PHP_FUNCTION(intlcal_create_instance)
size_t dummy;
TimeZone *timeZone;
UErrorCode status = U_ZERO_ERROR;
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|zs!",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|zs!",
&zv_timezone, &locale_str, &dummy) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_create_calendar: bad arguments", 0 TSRMLS_CC);
+ "intlcal_create_calendar: bad arguments", 0);
RETURN_NULL();
}
timeZone = timezone_process_timezone_argument(zv_timezone, NULL,
- "intlcal_create_instance" TSRMLS_CC);
+ "intlcal_create_instance");
if (timeZone == NULL) {
RETURN_NULL();
}
if (!locale_str) {
- locale_str = intl_locale_get_default(TSRMLS_C);
+ locale_str = intl_locale_get_default();
}
Calendar *cal = Calendar::createInstance(timeZone,
Locale::createFromName(locale_str), status);
if (cal == NULL) {
delete timeZone;
- intl_error_set(NULL, status, "Error creating ICU Calendar object", 0 TSRMLS_CC);
+ intl_error_set(NULL, status, "Error creating ICU Calendar object", 0);
RETURN_NULL();
}
- calendar_object_create(return_value, cal TSRMLS_CC);
+ calendar_object_create(return_value, cal);
}
#if U_ICU_VERSION_MAJOR_NUM * 10 + U_ICU_VERSION_MINOR_NUM >= 42
@@ -146,12 +146,12 @@ U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale)
size_t key_len,
locale_len;
zend_bool commonly_used;
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ssb",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ssb",
&key, &key_len, &locale, &locale_len, &commonly_used) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_keyword_values_for_locale: bad arguments", 0 TSRMLS_CC);
+ "intlcal_get_keyword_values_for_locale: bad arguments", 0);
RETURN_FALSE;
}
@@ -162,7 +162,7 @@ U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale)
status);
if (se == NULL) {
intl_error_set(NULL, status, "intlcal_get_keyword_values_for_locale: "
- "error calling underlying method", 0 TSRMLS_CC);
+ "error calling underlying method", 0);
RETURN_FALSE;
}
#else
@@ -171,24 +171,24 @@ U_CFUNC PHP_FUNCTION(intlcal_get_keyword_values_for_locale)
if (U_FAILURE(status)) {
uenum_close(uenum);
intl_error_set(NULL, status, "intlcal_get_keyword_values_for_locale: "
- "error calling underlying method", 0 TSRMLS_CC);
+ "error calling underlying method", 0);
RETURN_FALSE;
}
StringEnumeration *se = new BugStringCharEnumeration(uenum);
#endif
- IntlIterator_from_StringEnumeration(se, return_value TSRMLS_CC);
+ IntlIterator_from_StringEnumeration(se, return_value);
}
#endif //ICU 4.2 only
U_CFUNC PHP_FUNCTION(intlcal_get_now)
{
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_now: bad arguments", 0 TSRMLS_CC);
+ "intlcal_get_now: bad arguments", 0);
RETURN_FALSE;
}
@@ -197,11 +197,11 @@ U_CFUNC PHP_FUNCTION(intlcal_get_now)
U_CFUNC PHP_FUNCTION(intlcal_get_available_locales)
{
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_available_locales: bad arguments", 0 TSRMLS_CC);
+ "intlcal_get_available_locales: bad arguments", 0);
RETURN_FALSE;
}
@@ -223,17 +223,17 @@ static void _php_intlcal_field_uec_ret_in32t_method(
char *message;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Ol", &object, Calendar_ce_ptr, &field) == FAILURE) {
spprintf(&message, 0, "%s: bad arguments", method_name);
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, message, 1);
efree(message);
RETURN_FALSE;
}
if (field < 0 || field >= UCAL_FIELD_COUNT) {
spprintf(&message, 0, "%s: invalid field", method_name);
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, message, 1);
efree(message);
RETURN_FALSE;
}
@@ -257,10 +257,10 @@ U_CFUNC PHP_FUNCTION(intlcal_get_time)
{
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
&object, Calendar_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_time: bad arguments", 0 TSRMLS_CC);
+ "intlcal_get_time: bad arguments", 0);
RETURN_FALSE;
}
@@ -278,10 +278,10 @@ U_CFUNC PHP_FUNCTION(intlcal_set_time)
double time_arg;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Od",
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Od",
&object, Calendar_ce_ptr, &time_arg) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_set_time: bad arguments", 0 TSRMLS_CC);
+ "intlcal_set_time: bad arguments", 0);
RETURN_FALSE;
}
@@ -299,21 +299,21 @@ U_CFUNC PHP_FUNCTION(intlcal_add)
amount;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Oll", &object, Calendar_ce_ptr, &field, &amount) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_add: bad arguments", 0 TSRMLS_CC);
+ "intlcal_add: bad arguments", 0);
RETURN_FALSE;
}
if (field < 0 || field >= UCAL_FIELD_COUNT) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_add: invalid field", 0 TSRMLS_CC);
+ "intlcal_add: invalid field", 0);
RETURN_FALSE;
}
if (amount < INT32_MIN || amount > INT32_MAX) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_add: amount out of bounds", 0 TSRMLS_CC);
+ "intlcal_add: amount out of bounds", 0);
RETURN_FALSE;
}
@@ -331,10 +331,10 @@ U_CFUNC PHP_FUNCTION(intlcal_set_time_zone)
TimeZone *timeZone;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Oz!", &object, Calendar_ce_ptr, &zv_timezone) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_set_time_zone: bad arguments", 0 TSRMLS_CC);
+ "intlcal_set_time_zone: bad arguments", 0);
RETURN_FALSE;
}
@@ -345,7 +345,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set_time_zone)
}
timeZone = timezone_process_timezone_argument(zv_timezone,
- CALENDAR_ERROR_P(co), "intlcal_set_time_zone" TSRMLS_CC);
+ CALENDAR_ERROR_P(co), "intlcal_set_time_zone");
if (timeZone == NULL) {
RETURN_FALSE;
}
@@ -364,11 +364,11 @@ static void _php_intlcal_before_after(
Calendar_object *when_co;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"OO", &object, Calendar_ce_ptr, &when_object, Calendar_ce_ptr)
== FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_before/after: bad arguments", 0 TSRMLS_CC);
+ "intlcal_before/after: bad arguments", 0);
RETURN_FALSE;
}
@@ -377,7 +377,7 @@ static void _php_intlcal_before_after(
when_co = Z_INTL_CALENDAR_P(when_object);
if (when_co->ucal == NULL) {
intl_errors_set(&co->err, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_before/after: Other IntlCalendar was unconstructed", 0 TSRMLS_CC);
+ "intlcal_before/after: Other IntlCalendar was unconstructed", 0);
RETURN_FALSE;
}
@@ -410,7 +410,7 @@ U_CFUNC PHP_FUNCTION(intlcal_set)
if (ZEND_NUM_ARGS() > (getThis() ? 6 : 7) ||
zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_set: too many arguments", 0 TSRMLS_CC);
+ "intlcal_set: too many arguments", 0);
RETURN_FALSE;
}
if (!getThis()) {
@@ -422,11 +422,11 @@ U_CFUNC PHP_FUNCTION(intlcal_set)
}
if (variant == 4 ||
- zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Oll|llll", &object, Calendar_ce_ptr, &arg1, &arg2, &arg3, &arg4,
&arg5, &arg6) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_set: bad arguments", 0 TSRMLS_CC);
+ "intlcal_set: bad arguments", 0);
RETURN_FALSE;
}
@@ -434,14 +434,14 @@ U_CFUNC PHP_FUNCTION(intlcal_set)
if (Z_LVAL(args[i]) < INT32_MIN || Z_LVAL(args[i]) > INT32_MAX) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_set: at least one of the arguments has an absolute "
- "value that is too large", 0 TSRMLS_CC);
+ "value that is too large", 0);
RETURN_FALSE;
}
}
if (variant == 2 && (arg1 < 0 || arg1 >= UCAL_FIELD_COUNT)) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_set: invalid field", 0 TSRMLS_CC);
+ "intlcal_set: invalid field", 0);
RETURN_FALSE;
}
@@ -472,37 +472,37 @@ U_CFUNC PHP_FUNCTION(intlcal_roll)
if (ZEND_NUM_ARGS() > (getThis() ? 2 :3) ||
zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_set: too many arguments", 0 TSRMLS_CC);
+ "intlcal_set: too many arguments", 0);
RETURN_FALSE;
}
if (!getThis()) {
args++;
}
if (!Z_ISUNDEF(args[1]) && (Z_TYPE(args[1]) == IS_TRUE || Z_TYPE(args[1]) == IS_FALSE)) {
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Olb", &object, Calendar_ce_ptr, &field, &bool_variant_val)
== FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_roll: bad arguments", 0 TSRMLS_CC);
+ "intlcal_roll: bad arguments", 0);
RETURN_FALSE;
}
bool_variant_val = Z_TYPE(args[1]) == IS_TRUE? 1 : 0;
- } else if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ } else if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Oll", &object, Calendar_ce_ptr, &field, &value) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_roll: bad arguments", 0 TSRMLS_CC);
+ "intlcal_roll: bad arguments", 0);
RETURN_FALSE;
}
if (field < 0 || field >= UCAL_FIELD_COUNT) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_roll: invalid field", 0 TSRMLS_CC);
+ "intlcal_roll: invalid field", 0);
RETURN_FALSE;
}
if (bool_variant_val == (zend_bool)-1 &&
(value < INT32_MIN || value > INT32_MAX)) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_roll: value out of bounds", 0 TSRMLS_CC);
+ "intlcal_roll: value out of bounds", 0);
RETURN_FALSE;
}
@@ -531,7 +531,7 @@ U_CFUNC PHP_FUNCTION(intlcal_clear)
if (ZEND_NUM_ARGS() > (getThis() ? 1 : 2) ||
zend_get_parameters_array_ex(ZEND_NUM_ARGS(), args) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_clear: too many arguments", 0 TSRMLS_CC);
+ "intlcal_clear: too many arguments", 0);
RETURN_FALSE;
}
if (!getThis()) {
@@ -539,21 +539,21 @@ U_CFUNC PHP_FUNCTION(intlcal_clear)
}
if (Z_ISUNDEF(args[0]) || Z_TYPE(args[0]) == IS_NULL) {
zval *dummy; /* we know it's null */
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(),
getThis(), "O|z", &object, Calendar_ce_ptr, &dummy) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_clear: bad arguments", 0 TSRMLS_CC);
+ "intlcal_clear: bad arguments", 0);
RETURN_FALSE;
}
variant = 0;
- } else if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC,
+ } else if (zend_parse_method_parameters(ZEND_NUM_ARGS(),
getThis(), "Ol", &object, Calendar_ce_ptr, &field) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_clear: bad arguments", 0 TSRMLS_CC);
+ "intlcal_clear: bad arguments", 0);
RETURN_FALSE;
} else if (field < 0 || field >= UCAL_FIELD_COUNT) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_clear: invalid field", 0 TSRMLS_CC);
+ "intlcal_clear: invalid field", 0);
RETURN_FALSE;
} else {
variant = 1;
@@ -576,16 +576,16 @@ U_CFUNC PHP_FUNCTION(intlcal_field_difference)
double when;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Odl", &object, Calendar_ce_ptr, &when, &field) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_field_difference: bad arguments", 0 TSRMLS_CC);
+ "intlcal_field_difference: bad arguments", 0);
RETURN_FALSE;
}
if (field < 0 || field >= UCAL_FIELD_COUNT) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_field_difference: invalid field", 0 TSRMLS_CC);
+ "intlcal_field_difference: invalid field", 0);
RETURN_FALSE;
}
@@ -617,16 +617,16 @@ U_CFUNC PHP_FUNCTION(intlcal_get_day_of_week_type)
zend_ulong dow;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Ol", &object, Calendar_ce_ptr, &dow) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_day_of_week_type: bad arguments", 0 TSRMLS_CC);
+ "intlcal_get_day_of_week_type: bad arguments", 0);
RETURN_FALSE;
}
if (dow < UCAL_SUNDAY || dow > UCAL_SATURDAY) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_day_of_week_type: invalid day of week", 0 TSRMLS_CC);
+ "intlcal_get_day_of_week_type: invalid day of week", 0);
RETURN_FALSE;
}
@@ -645,10 +645,10 @@ U_CFUNC PHP_FUNCTION(intlcal_get_first_day_of_week)
{
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"O", &object, Calendar_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_first_day_of_week: bad arguments", 0 TSRMLS_CC);
+ "intlcal_get_first_day_of_week: bad arguments", 0);
RETURN_FALSE;
}
@@ -670,17 +670,17 @@ static void _php_intlcal_field_ret_in32t_method(
char *message;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Ol", &object, Calendar_ce_ptr, &field) == FAILURE) {
spprintf(&message, 0, "%s: bad arguments", method_name);
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, message, 1);
efree(message);
RETURN_FALSE;
}
if (field < 0 || field >= UCAL_FIELD_COUNT) {
spprintf(&message, 0, "%s: invalid field", method_name);
- intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, message, 1);
efree(message);
RETURN_FALSE;
}
@@ -710,16 +710,16 @@ U_CFUNC PHP_FUNCTION(intlcal_get_locale)
zend_long locale_type;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Ol", &object, Calendar_ce_ptr, &locale_type) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_locale: bad arguments", 0 TSRMLS_CC);
+ "intlcal_get_locale: bad arguments", 0);
RETURN_FALSE;
}
if (locale_type != ULOC_ACTUAL_LOCALE && locale_type != ULOC_VALID_LOCALE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_locale: invalid locale type", 0 TSRMLS_CC);
+ "intlcal_get_locale: invalid locale type", 0);
RETURN_FALSE;
}
@@ -743,10 +743,10 @@ U_CFUNC PHP_FUNCTION(intlcal_get_minimal_days_in_first_week)
{
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"O", &object, Calendar_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_minimal_days_in_first_week: bad arguments", 0 TSRMLS_CC);
+ "intlcal_get_minimal_days_in_first_week: bad arguments", 0);
RETURN_FALSE;
}
@@ -769,10 +769,10 @@ U_CFUNC PHP_FUNCTION(intlcal_get_time_zone)
{
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"O", &object, Calendar_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_time_zone: bad arguments", 0 TSRMLS_CC);
+ "intlcal_get_time_zone: bad arguments", 0);
RETURN_FALSE;
}
@@ -781,21 +781,21 @@ U_CFUNC PHP_FUNCTION(intlcal_get_time_zone)
TimeZone *tz = co->ucal->getTimeZone().clone();
if (tz == NULL) {
intl_errors_set(CALENDAR_ERROR_P(co), U_MEMORY_ALLOCATION_ERROR,
- "intlcal_get_time_zone: could not clone TimeZone", 0 TSRMLS_CC);
+ "intlcal_get_time_zone: could not clone TimeZone", 0);
RETURN_FALSE;
}
- timezone_object_construct(tz, return_value, 1 TSRMLS_CC);
+ timezone_object_construct(tz, return_value, 1);
}
U_CFUNC PHP_FUNCTION(intlcal_get_type)
{
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"O", &object, Calendar_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_type: bad arguments", 0 TSRMLS_CC);
+ "intlcal_get_type: bad arguments", 0);
RETURN_FALSE;
}
@@ -810,16 +810,16 @@ U_CFUNC PHP_FUNCTION(intlcal_get_weekend_transition)
zend_long dow;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Ol", &object, Calendar_ce_ptr, &dow) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_weekend_transition: bad arguments", 0 TSRMLS_CC);
+ "intlcal_get_weekend_transition: bad arguments", 0);
RETURN_FALSE;
}
if (dow < UCAL_SUNDAY || dow > UCAL_SATURDAY) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_weekend_transition: invalid day of week", 0 TSRMLS_CC);
+ "intlcal_get_weekend_transition: invalid day of week", 0);
RETURN_FALSE;
}
@@ -838,10 +838,10 @@ U_CFUNC PHP_FUNCTION(intlcal_in_daylight_time)
{
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"O", &object, Calendar_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_in_daylight_time: bad arguments", 0 TSRMLS_CC);
+ "intlcal_in_daylight_time: bad arguments", 0);
RETURN_FALSE;
}
@@ -860,18 +860,18 @@ U_CFUNC PHP_FUNCTION(intlcal_is_equivalent_to)
Calendar_object *other_co;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"OO", &object, Calendar_ce_ptr, &other_object, Calendar_ce_ptr)
== FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_is_equivalent_to: bad arguments", 0 TSRMLS_CC);
+ "intlcal_is_equivalent_to: bad arguments", 0);
RETURN_FALSE;
}
other_co = Z_INTL_CALENDAR_P(other_object);
if (other_co->ucal == NULL) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "intlcal_is_equivalent_to:"
- " Other IntlCalendar is unconstructed", 0 TSRMLS_CC);
+ " Other IntlCalendar is unconstructed", 0);
RETURN_FALSE;
}
@@ -884,10 +884,10 @@ U_CFUNC PHP_FUNCTION(intlcal_is_lenient)
{
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"O", &object, Calendar_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_is_lenient: bad arguments", 0 TSRMLS_CC);
+ "intlcal_is_lenient: bad arguments", 0);
RETURN_FALSE;
}
@@ -901,16 +901,16 @@ U_CFUNC PHP_FUNCTION(intlcal_is_set)
zend_long field;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Ol", &object, Calendar_ce_ptr, &field) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_is_set: bad arguments", 0 TSRMLS_CC);
+ "intlcal_is_set: bad arguments", 0);
RETURN_FALSE;
}
if (field < 0 || field >= UCAL_FIELD_COUNT) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_is_set: invalid field", 0 TSRMLS_CC);
+ "intlcal_is_set: invalid field", 0);
RETURN_FALSE;
}
@@ -927,13 +927,13 @@ U_CFUNC PHP_FUNCTION(intlcal_is_weekend)
CALENDAR_METHOD_INIT_VARS;
if (zend_parse_method_parameters_ex(ZEND_PARSE_PARAMS_QUIET,
- ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ ZEND_NUM_ARGS(), getThis(),
"O|z!", &object, Calendar_ce_ptr, &rawDate) == FAILURE
|| (rawDate != NULL &&
- zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"O|d", &object, Calendar_ce_ptr, &date) == FAILURE)) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_is_weekend: bad arguments", 0 TSRMLS_CC);
+ "intlcal_is_weekend: bad arguments", 0);
RETURN_FALSE;
}
@@ -956,16 +956,16 @@ U_CFUNC PHP_FUNCTION(intlcal_set_first_day_of_week)
zend_long dow;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Ol", &object, Calendar_ce_ptr, &dow) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_set_first_day_of_week: bad arguments", 0 TSRMLS_CC);
+ "intlcal_set_first_day_of_week: bad arguments", 0);
RETURN_FALSE;
}
if (dow < UCAL_SUNDAY || dow > UCAL_SATURDAY) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_set_first_day_of_week: invalid day of week", 0 TSRMLS_CC);
+ "intlcal_set_first_day_of_week: invalid day of week", 0);
RETURN_FALSE;
}
@@ -981,10 +981,10 @@ U_CFUNC PHP_FUNCTION(intlcal_set_lenient)
zend_bool is_lenient;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Ob", &object, Calendar_ce_ptr, &is_lenient) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_set_lenient: bad arguments", 0 TSRMLS_CC);
+ "intlcal_set_lenient: bad arguments", 0);
RETURN_FALSE;
}
@@ -1000,17 +1000,17 @@ U_CFUNC PHP_FUNCTION(intlcal_set_minimal_days_in_first_week)
zend_long num_days;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Ol", &object, Calendar_ce_ptr, &num_days) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_set_minimal_days_in_first_week: bad arguments", 0 TSRMLS_CC);
+ "intlcal_set_minimal_days_in_first_week: bad arguments", 0);
RETURN_FALSE;
}
if (num_days < 1 || num_days > 7) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_set_minimal_days_in_first_week: invalid number of days; "
- "must be between 1 and 7", 0 TSRMLS_CC);
+ "must be between 1 and 7", 0);
RETURN_FALSE;
}
@@ -1027,11 +1027,11 @@ U_CFUNC PHP_FUNCTION(intlcal_equals)
Calendar_object *other_co;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"OO", &object, Calendar_ce_ptr, &other_object, Calendar_ce_ptr)
== FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_equals: bad arguments", 0 TSRMLS_CC);
+ "intlcal_equals: bad arguments", 0);
RETURN_FALSE;
}
@@ -1039,7 +1039,7 @@ U_CFUNC PHP_FUNCTION(intlcal_equals)
other_co = Z_INTL_CALENDAR_P(other_object);
if (other_co->ucal == NULL) {
intl_errors_set(&co->err, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_equals: The second IntlCalendar is unconstructed", 0 TSRMLS_CC);
+ "intlcal_equals: The second IntlCalendar is unconstructed", 0);
RETURN_FALSE;
}
@@ -1055,10 +1055,10 @@ U_CFUNC PHP_FUNCTION(intlcal_get_repeated_wall_time_option)
{
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"O", &object, Calendar_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_repeated_wall_time_option: bad arguments", 0 TSRMLS_CC);
+ "intlcal_get_repeated_wall_time_option: bad arguments", 0);
RETURN_FALSE;
}
@@ -1071,10 +1071,10 @@ U_CFUNC PHP_FUNCTION(intlcal_get_skipped_wall_time_option)
{
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"O", &object, Calendar_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_skipped_wall_time_option: bad arguments", 0 TSRMLS_CC);
+ "intlcal_get_skipped_wall_time_option: bad arguments", 0);
RETURN_FALSE;
}
@@ -1088,16 +1088,16 @@ U_CFUNC PHP_FUNCTION(intlcal_set_repeated_wall_time_option)
zend_long option;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Ol", &object, Calendar_ce_ptr, &option) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_set_repeated_wall_time_option: bad arguments", 0 TSRMLS_CC);
+ "intlcal_set_repeated_wall_time_option: bad arguments", 0);
RETURN_FALSE;
}
if (option != UCAL_WALLTIME_FIRST && option != UCAL_WALLTIME_LAST) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_set_repeated_wall_time_option: invalid option", 0 TSRMLS_CC);
+ "intlcal_set_repeated_wall_time_option: invalid option", 0);
RETURN_FALSE;
}
@@ -1113,17 +1113,17 @@ U_CFUNC PHP_FUNCTION(intlcal_set_skipped_wall_time_option)
zend_long option;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Ol", &object, Calendar_ce_ptr, &option) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_set_skipped_wall_time_option: bad arguments", 0 TSRMLS_CC);
+ "intlcal_set_skipped_wall_time_option: bad arguments", 0);
RETURN_FALSE;
}
if (option != UCAL_WALLTIME_FIRST && option != UCAL_WALLTIME_LAST
&& option != UCAL_WALLTIME_NEXT_VALID) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_set_skipped_wall_time_option: invalid option", 0 TSRMLS_CC);
+ "intlcal_set_skipped_wall_time_option: invalid option", 0);
RETURN_FALSE;
}
@@ -1148,21 +1148,21 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time)
TimeZone *timeZone;
UErrorCode status = U_ZERO_ERROR;
Calendar *cal;
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|s!",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "z|s!",
&zv_arg, &locale_str, &locale_str_len) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_from_date_time: bad arguments", 0 TSRMLS_CC);
+ "intlcal_from_date_time: bad arguments", 0);
RETURN_NULL();
}
if (!(Z_TYPE_P(zv_arg) == IS_OBJECT && instanceof_function(
- Z_OBJCE_P(zv_arg), php_date_get_date_ce() TSRMLS_CC))) {
+ Z_OBJCE_P(zv_arg), php_date_get_date_ce()))) {
object_init_ex(&zv_tmp, php_date_get_date_ce());
zend_call_method_with_1_params(&zv_tmp, NULL, NULL, "__construct", NULL, zv_arg);
if (EG(exception)) {
- zend_object_store_ctor_failed(Z_OBJ(zv_tmp) TSRMLS_CC);
+ zend_object_store_ctor_failed(Z_OBJ(zv_tmp));
goto error;
}
zv_datetime = &zv_tmp;
@@ -1174,7 +1174,7 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time)
if (!datetime->time) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_from_date_time: DateTime object is unconstructed",
- 0 TSRMLS_CC);
+ 0);
goto error;
}
@@ -1182,7 +1182,7 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time)
if (Z_TYPE(zv_timestamp) != IS_LONG) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_from_date_time: bad DateTime; call to "
- "DateTime::getTimestamp() failed", 0 TSRMLS_CC);
+ "DateTime::getTimestamp() failed", 0);
zval_ptr_dtor(&zv_timestamp);
goto error;
}
@@ -1191,14 +1191,14 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time)
timeZone = TimeZone::getGMT()->clone();
} else {
timeZone = timezone_convert_datetimezone(datetime->time->zone_type,
- datetime, 1, NULL, "intlcal_from_date_time" TSRMLS_CC);
+ datetime, 1, NULL, "intlcal_from_date_time");
if (timeZone == NULL) {
goto error;
}
}
if (!locale_str) {
- locale_str = const_cast<char*>(intl_locale_get_default(TSRMLS_C));
+ locale_str = const_cast<char*>(intl_locale_get_default());
}
cal = Calendar::createInstance(timeZone,
@@ -1206,7 +1206,7 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time)
if (cal == NULL) {
delete timeZone;
intl_error_set(NULL, status, "intlcal_from_date_time: "
- "error creating ICU Calendar object", 0 TSRMLS_CC);
+ "error creating ICU Calendar object", 0);
goto error;
}
cal->setTime(((UDate)Z_LVAL(zv_timestamp)) * 1000., status);
@@ -1214,11 +1214,11 @@ U_CFUNC PHP_FUNCTION(intlcal_from_date_time)
/* time zone was adopted by cal; should not be deleted here */
delete cal;
intl_error_set(NULL, status, "intlcal_from_date_time: "
- "error creating ICU Calendar::setTime()", 0 TSRMLS_CC);
+ "error creating ICU Calendar::setTime()", 0);
goto error;
}
- calendar_object_create(return_value, cal TSRMLS_CC);
+ calendar_object_create(return_value, cal);
error:
if (zv_datetime && zv_datetime != zv_arg) {
@@ -1231,10 +1231,10 @@ U_CFUNC PHP_FUNCTION(intlcal_to_date_time)
zval retval;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
&object, Calendar_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_to_date_time: bad arguments", 0 TSRMLS_CC);
+ "intlcal_to_date_time: bad arguments", 0);
RETURN_FALSE;
}
@@ -1253,7 +1253,7 @@ U_CFUNC PHP_FUNCTION(intlcal_to_date_time)
if (date > (double)U_INT64_MAX || date < (double)U_INT64_MIN) {
intl_errors_set(CALENDAR_ERROR_P(co), U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_to_date_time: The calendar date is out of the "
- "range for a 64-bit integer", 0 TSRMLS_CC);
+ "range for a 64-bit integer", 0);
RETURN_FALSE;
}
@@ -1266,7 +1266,7 @@ U_CFUNC PHP_FUNCTION(intlcal_to_date_time)
/* Now get the time zone */
const TimeZone& tz = co->ucal->getTimeZone();
zval *timezone_zval = timezone_convert_to_datetimezone(
- &tz, CALENDAR_ERROR_P(co), "intlcal_to_date_time", &tmp TSRMLS_CC);
+ &tz, CALENDAR_ERROR_P(co), "intlcal_to_date_time", &tmp);
if (timezone_zval == NULL) {
RETURN_FALSE;
}
@@ -1279,8 +1279,8 @@ U_CFUNC PHP_FUNCTION(intlcal_to_date_time)
if (EG(exception)) {
intl_errors_set(CALENDAR_ERROR_P(co), U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_to_date_time: DateTime constructor has thrown exception",
- 1 TSRMLS_CC);
- zend_object_store_ctor_failed(Z_OBJ_P(return_value) TSRMLS_CC);
+ 1);
+ zend_object_store_ctor_failed(Z_OBJ_P(return_value));
zval_ptr_dtor(return_value);
zval_ptr_dtor(&ts_zval);
@@ -1295,7 +1295,7 @@ U_CFUNC PHP_FUNCTION(intlcal_to_date_time)
if (Z_ISUNDEF(retval) || Z_TYPE(retval) == IS_FALSE) {
intl_errors_set(CALENDAR_ERROR_P(co), U_ILLEGAL_ARGUMENT_ERROR,
"intlcal_to_date_time: call to DateTime::setTimeZone has failed",
- 1 TSRMLS_CC);
+ 1);
zval_ptr_dtor(return_value);
RETVAL_FALSE;
goto error;
@@ -1310,10 +1310,10 @@ U_CFUNC PHP_FUNCTION(intlcal_get_error_code)
{
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
&object, Calendar_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_error_code: bad arguments", 0 TSRMLS_CC);
+ "intlcal_get_error_code: bad arguments", 0);
RETURN_FALSE;
}
@@ -1330,10 +1330,10 @@ U_CFUNC PHP_FUNCTION(intlcal_get_error_message)
zend_string* message = NULL;
CALENDAR_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "O",
&object, Calendar_ce_ptr) == FAILURE) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intlcal_get_error_message: bad arguments", 0 TSRMLS_CC );
+ "intlcal_get_error_message: bad arguments", 0 );
RETURN_FALSE;
}
@@ -1344,6 +1344,6 @@ U_CFUNC PHP_FUNCTION(intlcal_get_error_message)
RETURN_FALSE;
/* Return last error message. */
- message = intl_error_get_message(CALENDAR_ERROR_P(co) TSRMLS_CC);
+ message = intl_error_get_message(CALENDAR_ERROR_P(co));
RETURN_STR(message);
}