summaryrefslogtreecommitdiff
path: root/ext/intl/timezone
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-12-13 23:06:14 +0100
committerAnatol Belski <ab@php.net>2014-12-13 23:06:14 +0100
commitbdeb220f48825642f84cdbf3ff23a30613c92e86 (patch)
tree1a6cf34d20420e4815b4becb21311a4457d84103 /ext/intl/timezone
parentbb66f385d09e7e55390e9f57fcbca08f6b43ff91 (diff)
downloadphp-git-bdeb220f48825642f84cdbf3ff23a30613c92e86.tar.gz
first shot remove TSRMLS_* things
Diffstat (limited to 'ext/intl/timezone')
-rw-r--r--ext/intl/timezone/timezone_class.cpp86
-rw-r--r--ext/intl/timezone/timezone_class.h10
-rw-r--r--ext/intl/timezone/timezone_methods.cpp154
3 files changed, 125 insertions, 125 deletions
diff --git a/ext/intl/timezone/timezone_class.cpp b/ext/intl/timezone/timezone_class.cpp
index d2aaa12344..6818d0d9d8 100644
--- a/ext/intl/timezone/timezone_class.cpp
+++ b/ext/intl/timezone/timezone_class.cpp
@@ -45,7 +45,7 @@ U_CDECL_END
/* }}} */
/* {{{ timezone_object_construct */
-U_CFUNC void timezone_object_construct(const TimeZone *zone, zval *object, int owned TSRMLS_DC)
+U_CFUNC void timezone_object_construct(const TimeZone *zone, zval *object, int owned)
{
TimeZone_object *to;
@@ -60,7 +60,7 @@ U_CFUNC void timezone_object_construct(const TimeZone *zone, zval *object, int o
* Convert from TimeZone to DateTimeZone object */
U_CFUNC zval *timezone_convert_to_datetimezone(const TimeZone *timeZone,
intl_error *outside_error,
- const char *func, zval *ret TSRMLS_DC)
+ const char *func, zval *ret)
{
UnicodeString id;
char *message = NULL;
@@ -71,7 +71,7 @@ U_CFUNC zval *timezone_convert_to_datetimezone(const TimeZone *timeZone,
if (id.isBogus()) {
spprintf(&message, 0, "%s: could not obtain TimeZone id", func);
intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR,
- message, 1 TSRMLS_CC);
+ message, 1);
goto error;
}
@@ -92,7 +92,7 @@ U_CFUNC zval *timezone_convert_to_datetimezone(const TimeZone *timeZone,
if (intl_charFromString(id, &str, &str_len, &INTL_ERROR_CODE(*outside_error)) == FAILURE) {
spprintf(&message, 0, "%s: could not convert id to UTF-8", func);
intl_errors_set(outside_error, INTL_ERROR_CODE(*outside_error),
- message, 1 TSRMLS_CC);
+ message, 1);
goto error;
}
ZVAL_STRINGL(&arg, str, str_len);
@@ -103,8 +103,8 @@ U_CFUNC zval *timezone_convert_to_datetimezone(const TimeZone *timeZone,
spprintf(&message, 0,
"%s: DateTimeZone constructor threw exception", func);
intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR,
- message, 1 TSRMLS_CC);
- zend_object_store_ctor_failed(Z_OBJ_P(ret) TSRMLS_CC);
+ message, 1);
+ zend_object_store_ctor_failed(Z_OBJ_P(ret));
zval_ptr_dtor(&arg);
goto error;
}
@@ -130,14 +130,14 @@ error:
* TimeZone argument processor. outside_error may be NULL (for static functions/constructors) */
U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone,
intl_error *outside_error,
- const char *func TSRMLS_DC)
+ const char *func)
{
zval local_zv_tz;
char *message = NULL;
TimeZone *timeZone;
if (zv_timezone == NULL || Z_TYPE_P(zv_timezone) == IS_NULL) {
- timelib_tzinfo *tzinfo = get_timezone_info(TSRMLS_C);
+ timelib_tzinfo *tzinfo = get_timezone_info();
ZVAL_STRING(&local_zv_tz, tzinfo->name);
zv_timezone = &local_zv_tz;
} else {
@@ -145,13 +145,13 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone,
}
if (Z_TYPE_P(zv_timezone) == IS_OBJECT &&
- instanceof_function(Z_OBJCE_P(zv_timezone), TimeZone_ce_ptr TSRMLS_CC)) {
+ instanceof_function(Z_OBJCE_P(zv_timezone), TimeZone_ce_ptr)) {
TimeZone_object *to = Z_INTL_TIMEZONE_P(zv_timezone);
if (to->utimezone == NULL) {
spprintf(&message, 0, "%s: passed IntlTimeZone is not "
"properly constructed", func);
if (message) {
- intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR, message, 1);
efree(message);
}
zval_dtor(&local_zv_tz);
@@ -161,20 +161,20 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone,
if (timeZone == NULL) {
spprintf(&message, 0, "%s: could not clone TimeZone", func);
if (message) {
- intl_errors_set(outside_error, U_MEMORY_ALLOCATION_ERROR, message, 1 TSRMLS_CC);
+ intl_errors_set(outside_error, U_MEMORY_ALLOCATION_ERROR, message, 1);
efree(message);
}
zval_dtor(&local_zv_tz);
return NULL;
}
} else if (Z_TYPE_P(zv_timezone) == IS_OBJECT &&
- instanceof_function(Z_OBJCE_P(zv_timezone), php_date_get_timezone_ce() TSRMLS_CC)) {
+ instanceof_function(Z_OBJCE_P(zv_timezone), php_date_get_timezone_ce())) {
php_timezone_obj *tzobj = Z_PHPTIMEZONE_P(zv_timezone);
zval_dtor(&local_zv_tz);
return timezone_convert_datetimezone(tzobj->type, tzobj, 0,
- outside_error, func TSRMLS_CC);
+ outside_error, func);
} else {
UnicodeString id,
gottenId;
@@ -185,7 +185,7 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone,
spprintf(&message, 0, "%s: Time zone identifier given is not a "
"valid UTF-8 string", func);
if (message) {
- intl_errors_set(outside_error, status, message, 1 TSRMLS_CC);
+ intl_errors_set(outside_error, status, message, 1);
efree(message);
}
zval_dtor(&local_zv_tz);
@@ -195,7 +195,7 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone,
if (timeZone == NULL) {
spprintf(&message, 0, "%s: could not create time zone", func);
if (message) {
- intl_errors_set(outside_error, U_MEMORY_ALLOCATION_ERROR, message, 1 TSRMLS_CC);
+ intl_errors_set(outside_error, U_MEMORY_ALLOCATION_ERROR, message, 1);
efree(message);
}
zval_dtor(&local_zv_tz);
@@ -205,7 +205,7 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone,
spprintf(&message, 0, "%s: no such time zone: '%s'",
func, Z_STRVAL_P(zv_timezone));
if (message) {
- intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ intl_errors_set(outside_error, U_ILLEGAL_ARGUMENT_ERROR, message, 1);
efree(message);
}
zval_dtor(&local_zv_tz);
@@ -221,20 +221,20 @@ U_CFUNC TimeZone *timezone_process_timezone_argument(zval *zv_timezone,
/* }}} */
/* {{{ clone handler for TimeZone */
-static zend_object *TimeZone_clone_obj(zval *object TSRMLS_DC)
+static zend_object *TimeZone_clone_obj(zval *object)
{
TimeZone_object *to_orig,
*to_new;
zend_object *ret_val;
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
to_orig = Z_INTL_TIMEZONE_P(object);
- intl_error_reset(TIMEZONE_ERROR_P(to_orig) TSRMLS_CC);
+ intl_error_reset(TIMEZONE_ERROR_P(to_orig));
- ret_val = TimeZone_ce_ptr->create_object(Z_OBJCE_P(object) TSRMLS_CC);
+ ret_val = TimeZone_ce_ptr->create_object(Z_OBJCE_P(object));
to_new = php_intl_timezone_fetch_object(ret_val);
- zend_objects_clone_members(&to_new->zo, &to_orig->zo TSRMLS_CC);
+ zend_objects_clone_members(&to_new->zo, &to_orig->zo);
if (to_orig->utimezone != NULL) {
TimeZone *newTimeZone;
@@ -244,17 +244,17 @@ static zend_object *TimeZone_clone_obj(zval *object TSRMLS_DC)
if (!newTimeZone) {
zend_string *err_msg;
intl_errors_set_code(TIMEZONE_ERROR_P(to_orig),
- U_MEMORY_ALLOCATION_ERROR TSRMLS_CC);
+ U_MEMORY_ALLOCATION_ERROR);
intl_errors_set_custom_msg(TIMEZONE_ERROR_P(to_orig),
- "Could not clone IntlTimeZone", 0 TSRMLS_CC);
- err_msg = intl_error_get_message(TIMEZONE_ERROR_P(to_orig) TSRMLS_CC);
- zend_throw_exception(NULL, err_msg->val, 0 TSRMLS_CC);
+ "Could not clone IntlTimeZone", 0);
+ err_msg = intl_error_get_message(TIMEZONE_ERROR_P(to_orig));
+ zend_throw_exception(NULL, err_msg->val, 0);
zend_string_free(err_msg);
} else {
to_new->utimezone = newTimeZone;
}
} else {
- zend_throw_exception(NULL, "Cannot clone unconstructed IntlTimeZone", 0 TSRMLS_CC);
+ zend_throw_exception(NULL, "Cannot clone unconstructed IntlTimeZone", 0);
}
return ret_val;
@@ -263,7 +263,7 @@ static zend_object *TimeZone_clone_obj(zval *object TSRMLS_DC)
/* {{{ compare_objects handler for TimeZone
* Can't be used for >, >=, <, <= comparisons */
-static int TimeZone_compare_objects(zval *object1, zval *object2 TSRMLS_DC)
+static int TimeZone_compare_objects(zval *object1, zval *object2)
{
TimeZone_object *to1,
*to2;
@@ -272,7 +272,7 @@ static int TimeZone_compare_objects(zval *object1, zval *object2 TSRMLS_DC)
if (to1->utimezone == NULL || to2->utimezone == NULL) {
zend_throw_exception(NULL, "Comparison with at least one unconstructed "
- "IntlTimeZone operand", 0 TSRMLS_CC);
+ "IntlTimeZone operand", 0);
/* intentionally not returning */
} else {
if (*to1->utimezone == *to2->utimezone) {
@@ -285,7 +285,7 @@ static int TimeZone_compare_objects(zval *object1, zval *object2 TSRMLS_DC)
/* }}} */
/* {{{ get_debug_info handler for TimeZone */
-static HashTable *TimeZone_get_debug_info(zval *object, int *is_temp TSRMLS_DC)
+static HashTable *TimeZone_get_debug_info(zval *object, int *is_temp)
{
zval zv;
TimeZone_object *to;
@@ -343,23 +343,23 @@ static HashTable *TimeZone_get_debug_info(zval *object, int *is_temp TSRMLS_DC)
/* {{{ void TimeZone_object_init(TimeZone_object* to)
* Initialize internals of TImeZone_object not specific to zend standard objects.
*/
-static void TimeZone_object_init(TimeZone_object *to TSRMLS_DC)
+static void TimeZone_object_init(TimeZone_object *to)
{
- intl_error_init(TIMEZONE_ERROR_P(to) TSRMLS_CC);
+ intl_error_init(TIMEZONE_ERROR_P(to));
to->utimezone = NULL;
to->should_delete = 0;
}
/* }}} */
/* {{{ TimeZone_objects_dtor */
-static void TimeZone_objects_dtor(zend_object *object TSRMLS_DC)
+static void TimeZone_objects_dtor(zend_object *object)
{
- zend_objects_destroy_object(object TSRMLS_CC);
+ zend_objects_destroy_object(object);
}
/* }}} */
/* {{{ TimeZone_objects_free */
-static void TimeZone_objects_free(zend_object *object TSRMLS_DC)
+static void TimeZone_objects_free(zend_object *object)
{
TimeZone_object* to = php_intl_timezone_fetch_object(object);
@@ -367,22 +367,22 @@ static void TimeZone_objects_free(zend_object *object TSRMLS_DC)
delete to->utimezone;
to->utimezone = NULL;
}
- intl_error_reset(TIMEZONE_ERROR_P(to) TSRMLS_CC);
+ intl_error_reset(TIMEZONE_ERROR_P(to));
- zend_object_std_dtor(&to->zo TSRMLS_CC);
+ zend_object_std_dtor(&to->zo);
}
/* }}} */
/* {{{ TimeZone_object_create */
-static zend_object *TimeZone_object_create(zend_class_entry *ce TSRMLS_DC)
+static zend_object *TimeZone_object_create(zend_class_entry *ce)
{
TimeZone_object* intern;
intern = (TimeZone_object*)ecalloc(1, sizeof(TimeZone_object) + sizeof(zval) * (ce->default_properties_count - 1));
- zend_object_std_init(&intern->zo, ce TSRMLS_CC);
+ zend_object_std_init(&intern->zo, ce);
object_properties_init(&intern->zo, ce);
- TimeZone_object_init(intern TSRMLS_CC);
+ TimeZone_object_init(intern);
intern->zo.handlers = &TimeZone_handlers;
@@ -487,17 +487,17 @@ static zend_function_entry TimeZone_class_functions[] = {
/* {{{ timezone_register_IntlTimeZone_class
* Initialize 'IntlTimeZone' class
*/
-U_CFUNC void timezone_register_IntlTimeZone_class(TSRMLS_D)
+U_CFUNC void timezone_register_IntlTimeZone_class(void)
{
zend_class_entry ce;
/* Create and register 'IntlTimeZone' class. */
INIT_CLASS_ENTRY(ce, "IntlTimeZone", TimeZone_class_functions);
ce.create_object = TimeZone_object_create;
- TimeZone_ce_ptr = zend_register_internal_class(&ce TSRMLS_CC);
+ TimeZone_ce_ptr = zend_register_internal_class(&ce);
if (!TimeZone_ce_ptr) {
//can't happen now without bigger problems before
- php_error_docref0(NULL TSRMLS_CC, E_ERROR,
+ php_error_docref0(NULL, E_ERROR,
"IntlTimeZone: class registration has failed.");
return;
}
@@ -515,7 +515,7 @@ U_CFUNC void timezone_register_IntlTimeZone_class(TSRMLS_D)
/* Declare 'IntlTimeZone' class constants */
#define TIMEZONE_DECL_LONG_CONST(name, val) \
zend_declare_class_constant_long(TimeZone_ce_ptr, name, sizeof(name) - 1, \
- val TSRMLS_CC)
+ val)
TIMEZONE_DECL_LONG_CONST("DISPLAY_SHORT", TimeZone::SHORT);
TIMEZONE_DECL_LONG_CONST("DISPLAY_LONG", TimeZone::LONG);
diff --git a/ext/intl/timezone/timezone_class.h b/ext/intl/timezone/timezone_class.h
index 94b781b332..0667c78994 100644
--- a/ext/intl/timezone/timezone_class.h
+++ b/ext/intl/timezone/timezone_class.h
@@ -60,16 +60,16 @@ static inline TimeZone_object *php_intl_timezone_fetch_object(zend_object *obj)
#define TIMEZONE_METHOD_FETCH_OBJECT\
TIMEZONE_METHOD_FETCH_OBJECT_NO_CHECK; \
if (to->utimezone == NULL) { \
- intl_errors_set(&to->err, U_ILLEGAL_ARGUMENT_ERROR, "Found unconstructed IntlTimeZone", 0 TSRMLS_CC); \
+ intl_errors_set(&to->err, U_ILLEGAL_ARGUMENT_ERROR, "Found unconstructed IntlTimeZone", 0); \
RETURN_FALSE; \
}
-zval *timezone_convert_to_datetimezone(const TimeZone *timeZone, intl_error *outside_error, const char *func, zval *ret TSRMLS_DC);
-TimeZone *timezone_process_timezone_argument(zval *zv_timezone, intl_error *error, const char *func TSRMLS_DC);
+zval *timezone_convert_to_datetimezone(const TimeZone *timeZone, intl_error *outside_error, const char *func, zval *ret);
+TimeZone *timezone_process_timezone_argument(zval *zv_timezone, intl_error *error, const char *func);
-void timezone_object_construct(const TimeZone *zone, zval *object, int owned TSRMLS_DC);
+void timezone_object_construct(const TimeZone *zone, zval *object, int owned);
-void timezone_register_IntlTimeZone_class(TSRMLS_D);
+void timezone_register_IntlTimeZone_class(void);
extern zend_class_entry *TimeZone_ce_ptr;
extern zend_object_handlers TimeZone_handlers;
diff --git a/ext/intl/timezone/timezone_methods.cpp b/ext/intl/timezone/timezone_methods.cpp
index 033b216cdf..98ae6f97aa 100644
--- a/ext/intl/timezone/timezone_methods.cpp
+++ b/ext/intl/timezone/timezone_methods.cpp
@@ -41,19 +41,19 @@ U_CFUNC PHP_METHOD(IntlTimeZone, __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(intltz_create_time_zone)
{
char *str_id;
size_t str_id_len;
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s",
&str_id, &str_id_len) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_create_time_zone: bad arguments", 0 TSRMLS_CC);
+ "intltz_create_time_zone: bad arguments", 0);
RETURN_NULL();
}
@@ -61,13 +61,13 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone)
UnicodeString id = UnicodeString();
if (intl_stringFromChar(id, str_id, str_id_len, &status) == FAILURE) {
intl_error_set(NULL, status,
- "intltz_create_time_zone: could not convert time zone id to UTF-16", 0 TSRMLS_CC);
+ "intltz_create_time_zone: could not convert time zone id to UTF-16", 0);
RETURN_NULL();
}
//guaranteed non-null; GMT if timezone cannot be understood
TimeZone *tz = TimeZone::createTimeZone(id);
- timezone_object_construct(tz, return_value, 1 TSRMLS_CC);
+ timezone_object_construct(tz, return_value, 1);
}
U_CFUNC PHP_FUNCTION(intltz_from_date_time_zone)
@@ -75,12 +75,12 @@ U_CFUNC PHP_FUNCTION(intltz_from_date_time_zone)
zval *zv_timezone;
TimeZone *tz;
php_timezone_obj *tzobj;
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "O",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "O",
&zv_timezone, php_date_get_timezone_ce()) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_from_date_time_zone: bad arguments", 0 TSRMLS_CC);
+ "intltz_from_date_time_zone: bad arguments", 0);
RETURN_NULL();
}
@@ -88,58 +88,58 @@ U_CFUNC PHP_FUNCTION(intltz_from_date_time_zone)
if (!tzobj->initialized) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"intltz_from_date_time_zone: DateTimeZone object is unconstructed",
- 0 TSRMLS_CC);
+ 0);
RETURN_NULL();
}
tz = timezone_convert_datetimezone(tzobj->type, tzobj, FALSE, NULL,
- "intltz_from_date_time_zone" TSRMLS_CC);
+ "intltz_from_date_time_zone");
if (tz == NULL) {
RETURN_NULL();
}
- timezone_object_construct(tz, return_value, 1 TSRMLS_CC);
+ timezone_object_construct(tz, return_value, 1);
}
U_CFUNC PHP_FUNCTION(intltz_create_default)
{
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_create_default: bad arguments", 0 TSRMLS_CC);
+ "intltz_create_default: bad arguments", 0);
RETURN_NULL();
}
TimeZone *tz = TimeZone::createDefault();
- timezone_object_construct(tz, return_value, 1 TSRMLS_CC);
+ timezone_object_construct(tz, return_value, 1);
}
U_CFUNC PHP_FUNCTION(intltz_get_gmt)
{
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_get_gmt: bad arguments", 0 TSRMLS_CC);
+ "intltz_get_gmt: bad arguments", 0);
RETURN_NULL();
}
- timezone_object_construct(TimeZone::getGMT(), return_value, 0 TSRMLS_CC);
+ timezone_object_construct(TimeZone::getGMT(), return_value, 0);
}
#if U_ICU_VERSION_MAJOR_NUM >= 49
U_CFUNC PHP_FUNCTION(intltz_get_unknown)
{
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_get_unknown: bad arguments", 0 TSRMLS_CC);
+ "intltz_get_unknown: bad arguments", 0);
RETURN_NULL();
}
- timezone_object_construct(&TimeZone::getUnknown(), return_value, 0 TSRMLS_CC);
+ timezone_object_construct(&TimeZone::getUnknown(), return_value, 0);
}
#endif
@@ -147,13 +147,13 @@ U_CFUNC PHP_FUNCTION(intltz_create_enumeration)
{
zval *arg = NULL;
StringEnumeration *se = NULL;
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
/* double indirection to have the zend engine destroy the new zval that
* results from separation */
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "|z", &arg) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "|z", &arg) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_create_enumeration: bad arguments", 0 TSRMLS_CC);
+ "intltz_create_enumeration: bad arguments", 0);
RETURN_FALSE;
}
@@ -164,7 +164,7 @@ int_offset:
if (Z_LVAL_P(arg) < (zend_long)INT32_MIN ||
Z_LVAL_P(arg) > (zend_long)INT32_MAX) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_create_enumeration: value is out of range", 0 TSRMLS_CC);
+ "intltz_create_enumeration: value is out of range", 0);
RETURN_FALSE;
} else {
se = TimeZone::createEnumeration((int32_t) Z_LVAL_P(arg));
@@ -193,15 +193,15 @@ double_offset:
se = TimeZone::createEnumeration(Z_STRVAL_P(arg));
} else {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_create_enumeration: invalid argument type", 0 TSRMLS_CC);
+ "intltz_create_enumeration: invalid argument type", 0);
RETURN_FALSE;
}
if (se) {
- IntlIterator_from_StringEnumeration(se, return_value TSRMLS_CC);
+ IntlIterator_from_StringEnumeration(se, return_value);
} else {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_create_enumeration: error obtaining enumeration", 0 TSRMLS_CC);
+ "intltz_create_enumeration: error obtaining enumeration", 0);
RETVAL_FALSE;
}
}
@@ -210,12 +210,12 @@ U_CFUNC PHP_FUNCTION(intltz_count_equivalent_ids)
{
char *str_id;
size_t str_id_len;
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s",
&str_id, &str_id_len) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_count_equivalent_ids: bad arguments", 0 TSRMLS_CC);
+ "intltz_count_equivalent_ids: bad arguments", 0);
RETURN_FALSE;
}
@@ -223,7 +223,7 @@ U_CFUNC PHP_FUNCTION(intltz_count_equivalent_ids)
UnicodeString id = UnicodeString();
if (intl_stringFromChar(id, str_id, str_id_len, &status) == FAILURE) {
intl_error_set(NULL, status,
- "intltz_count_equivalent_ids: could not convert time zone id to UTF-16", 0 TSRMLS_CC);
+ "intltz_count_equivalent_ids: could not convert time zone id to UTF-16", 0);
RETURN_FALSE;
}
@@ -241,7 +241,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration)
int32_t offset,
*offsetp = NULL;
int arg3isnull = 0;
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
/* must come before zpp because zpp would convert the arg in the stack to 0 */
if (ZEND_NUM_ARGS() == 3) {
@@ -250,24 +250,24 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration)
!= FAILURE && Z_TYPE_P(zvoffset) == IS_NULL;
}
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "l|s!l",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "l|s!l",
&zoneType, &region, &region_len, &offset_arg) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_create_time_zone_id_enumeration: bad arguments", 0 TSRMLS_CC);
+ "intltz_create_time_zone_id_enumeration: bad arguments", 0);
RETURN_FALSE;
}
if (zoneType != UCAL_ZONE_TYPE_ANY && zoneType != UCAL_ZONE_TYPE_CANONICAL
&& zoneType != UCAL_ZONE_TYPE_CANONICAL_LOCATION) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_create_time_zone_id_enumeration: bad zone type", 0 TSRMLS_CC);
+ "intltz_create_time_zone_id_enumeration: bad zone type", 0);
RETURN_FALSE;
}
if (ZEND_NUM_ARGS() == 3) {
if (offset_arg < (zend_long)INT32_MIN || offset_arg > (zend_long)INT32_MAX) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_create_time_zone_id_enumeration: offset out of bounds", 0 TSRMLS_CC);
+ "intltz_create_time_zone_id_enumeration: offset out of bounds", 0);
RETURN_FALSE;
}
@@ -284,7 +284,7 @@ U_CFUNC PHP_FUNCTION(intltz_create_time_zone_id_enumeration)
INTL_CHECK_STATUS(uec, "intltz_create_time_zone_id_enumeration: "
"Error obtaining time zone id enumeration")
- IntlIterator_from_StringEnumeration(se, return_value TSRMLS_CC);
+ IntlIterator_from_StringEnumeration(se, return_value);
}
#endif
@@ -293,12 +293,12 @@ U_CFUNC PHP_FUNCTION(intltz_get_canonical_id)
char *str_id;
size_t str_id_len;
zval *is_systemid = NULL;
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|z",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s|z",
&str_id, &str_id_len, &is_systemid) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_get_canonical_id: bad arguments", 0 TSRMLS_CC);
+ "intltz_get_canonical_id: bad arguments", 0);
RETURN_FALSE;
}
@@ -306,7 +306,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_canonical_id)
UnicodeString id;
if (intl_stringFromChar(id, str_id, str_id_len, &status) == FAILURE) {
intl_error_set(NULL, status,
- "intltz_get_canonical_id: could not convert time zone id to UTF-16", 0 TSRMLS_CC);
+ "intltz_get_canonical_id: could not convert time zone id to UTF-16", 0);
RETURN_FALSE;
}
@@ -337,12 +337,12 @@ U_CFUNC PHP_FUNCTION(intltz_get_region)
char *str_id;
size_t str_id_len;
char outbuf[3];
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "s",
&str_id, &str_id_len) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_get_region: bad arguments", 0 TSRMLS_CC);
+ "intltz_get_region: bad arguments", 0);
RETURN_FALSE;
}
@@ -350,7 +350,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_region)
UnicodeString id;
if (intl_stringFromChar(id, str_id, str_id_len, &status) == FAILURE) {
intl_error_set(NULL, status,
- "intltz_get_region: could not convert time zone id to UTF-16", 0 TSRMLS_CC);
+ "intltz_get_region: could not convert time zone id to UTF-16", 0);
RETURN_FALSE;
}
@@ -363,11 +363,11 @@ U_CFUNC PHP_FUNCTION(intltz_get_region)
U_CFUNC PHP_FUNCTION(intltz_get_tz_data_version)
{
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
if (zend_parse_parameters_none() == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_get_tz_data_version: bad arguments", 0 TSRMLS_CC);
+ "intltz_get_tz_data_version: bad arguments", 0);
RETURN_FALSE;
}
@@ -384,13 +384,13 @@ U_CFUNC PHP_FUNCTION(intltz_get_equivalent_id)
char *str_id;
size_t str_id_len;
zend_long index;
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sl",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sl",
&str_id, &str_id_len, &index) == FAILURE ||
index < (zend_long)INT32_MIN || index > (zend_long)INT32_MAX) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_get_equivalent_id: bad arguments", 0 TSRMLS_CC);
+ "intltz_get_equivalent_id: bad arguments", 0);
RETURN_FALSE;
}
@@ -398,7 +398,7 @@ U_CFUNC PHP_FUNCTION(intltz_get_equivalent_id)
UnicodeString id;
if (intl_stringFromChar(id, str_id, str_id_len, &status) == FAILURE) {
intl_error_set(NULL, status,
- "intltz_get_equivalent_id: could not convert time zone id to UTF-16", 0 TSRMLS_CC);
+ "intltz_get_equivalent_id: could not convert time zone id to UTF-16", 0);
RETURN_FALSE;
}
@@ -418,10 +418,10 @@ U_CFUNC PHP_FUNCTION(intltz_get_id)
{
TIMEZONE_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, TimeZone_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_get_id: bad arguments", 0 TSRMLS_CC);
+ "intltz_get_id: bad arguments", 0);
RETURN_FALSE;
}
@@ -446,10 +446,10 @@ U_CFUNC PHP_FUNCTION(intltz_use_daylight_time)
{
TIMEZONE_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, TimeZone_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_use_daylight_time: bad arguments", 0 TSRMLS_CC);
+ "intltz_use_daylight_time: bad arguments", 0);
RETURN_FALSE;
}
@@ -468,11 +468,11 @@ U_CFUNC PHP_FUNCTION(intltz_get_offset)
dstOffset;
TIMEZONE_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"Odbz/z/", &object, TimeZone_ce_ptr, &date, &local, &rawOffsetArg,
&dstOffsetArg) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_get_offset: bad arguments", 0 TSRMLS_CC);
+ "intltz_get_offset: bad arguments", 0);
RETURN_FALSE;
}
@@ -497,10 +497,10 @@ U_CFUNC PHP_FUNCTION(intltz_get_raw_offset)
{
TIMEZONE_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, TimeZone_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_get_raw_offset: bad arguments", 0 TSRMLS_CC);
+ "intltz_get_raw_offset: bad arguments", 0);
RETURN_FALSE;
}
@@ -515,18 +515,18 @@ U_CFUNC PHP_FUNCTION(intltz_has_same_rules)
TimeZone_object *other_to;
TIMEZONE_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, TimeZone_ce_ptr, &other_object, TimeZone_ce_ptr)
== FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_has_same_rules: bad arguments", 0 TSRMLS_CC);
+ "intltz_has_same_rules: bad arguments", 0);
RETURN_FALSE;
}
TIMEZONE_METHOD_FETCH_OBJECT;
other_to = Z_INTL_TIMEZONE_P(other_object);
if (other_to->utimezone == NULL) {
intl_errors_set(&to->err, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_has_same_rules: The second IntlTimeZone is unconstructed", 0 TSRMLS_CC);
+ "intltz_has_same_rules: The second IntlTimeZone is unconstructed", 0);
RETURN_FALSE;
}
@@ -550,11 +550,11 @@ U_CFUNC PHP_FUNCTION(intltz_get_display_name)
size_t dummy = 0;
TIMEZONE_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(),
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(),
"O|bls!", &object, TimeZone_ce_ptr, &daylight, &display_type,
&locale_str, &dummy) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_get_display_name: bad arguments", 0 TSRMLS_CC);
+ "intltz_get_display_name: bad arguments", 0);
RETURN_FALSE;
}
@@ -565,12 +565,12 @@ U_CFUNC PHP_FUNCTION(intltz_get_display_name)
}
if (!found) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_get_display_name: wrong display type", 0 TSRMLS_CC);
+ "intltz_get_display_name: wrong display type", 0);
RETURN_FALSE;
}
if (!locale_str) {
- locale_str = intl_locale_get_default(TSRMLS_C);
+ locale_str = intl_locale_get_default();
}
TIMEZONE_METHOD_FETCH_OBJECT;
@@ -594,10 +594,10 @@ U_CFUNC PHP_FUNCTION(intltz_get_dst_savings)
{
TIMEZONE_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, TimeZone_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_get_dst_savings: bad arguments", 0 TSRMLS_CC);
+ "intltz_get_dst_savings: bad arguments", 0);
RETURN_FALSE;
}
@@ -611,17 +611,17 @@ U_CFUNC PHP_FUNCTION(intltz_to_date_time_zone)
zval tmp;
TIMEZONE_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, TimeZone_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_to_date_time_zone: bad arguments", 0 TSRMLS_CC);
+ "intltz_to_date_time_zone: bad arguments", 0);
RETURN_FALSE;
}
TIMEZONE_METHOD_FETCH_OBJECT;
zval *ret = timezone_convert_to_datetimezone(to->utimezone,
- &TIMEZONE_ERROR(to), "intltz_to_date_time_zone", &tmp TSRMLS_CC);
+ &TIMEZONE_ERROR(to), "intltz_to_date_time_zone", &tmp);
if (ret) {
RETURN_ZVAL(ret, 1, 1);
@@ -634,10 +634,10 @@ U_CFUNC PHP_FUNCTION(intltz_get_error_code)
{
TIMEZONE_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, TimeZone_ce_ptr) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_get_error_code: bad arguments", 0 TSRMLS_CC);
+ "intltz_get_error_code: bad arguments", 0);
RETURN_FALSE;
}
@@ -654,10 +654,10 @@ U_CFUNC PHP_FUNCTION(intltz_get_error_message)
zend_string* message = NULL;
TIMEZONE_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, TimeZone_ce_ptr) == FAILURE) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "intltz_get_error_message: bad arguments", 0 TSRMLS_CC );
+ "intltz_get_error_message: bad arguments", 0 );
RETURN_FALSE;
}
@@ -668,6 +668,6 @@ U_CFUNC PHP_FUNCTION(intltz_get_error_message)
RETURN_FALSE;
/* Return last error message. */
- message = intl_error_get_message(TIMEZONE_ERROR_P(to) TSRMLS_CC);
+ message = intl_error_get_message(TIMEZONE_ERROR_P(to));
RETURN_STR(message);
}