summaryrefslogtreecommitdiff
path: root/ext/intl/dateformat
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/dateformat')
-rw-r--r--ext/intl/dateformat/dateformat.c16
-rw-r--r--ext/intl/dateformat/dateformat_attr.c28
-rw-r--r--ext/intl/dateformat/dateformat_attrcpp.cpp42
-rw-r--r--ext/intl/dateformat/dateformat_class.c32
-rw-r--r--ext/intl/dateformat/dateformat_class.h4
-rw-r--r--ext/intl/dateformat/dateformat_create.cpp22
-rw-r--r--ext/intl/dateformat/dateformat_data.c12
-rw-r--r--ext/intl/dateformat/dateformat_data.h6
-rw-r--r--ext/intl/dateformat/dateformat_format.c24
-rw-r--r--ext/intl/dateformat/dateformat_format_object.cpp36
-rw-r--r--ext/intl/dateformat/dateformat_helpers.cpp14
-rw-r--r--ext/intl/dateformat/dateformat_helpers.h2
-rw-r--r--ext/intl/dateformat/dateformat_parse.c34
13 files changed, 136 insertions, 136 deletions
diff --git a/ext/intl/dateformat/dateformat.c b/ext/intl/dateformat/dateformat.c
index ffa606a9cd..b1821ce0d3 100644
--- a/ext/intl/dateformat/dateformat.c
+++ b/ext/intl/dateformat/dateformat.c
@@ -35,10 +35,10 @@ void dateformat_register_constants( INIT_FUNC_ARGS )
}
#define DATEFORMATTER_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_PERSISTENT | CONST_CS)
- #define DATEFORMATTER_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long( IntlDateFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UDAT_##x TSRMLS_CC );
- #define DATEFORMATTER_EXPOSE_CUSTOM_CLASS_CONST(name, value) zend_declare_class_constant_long( IntlDateFormatter_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC );
+ #define DATEFORMATTER_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long( IntlDateFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UDAT_##x );
+ #define DATEFORMATTER_EXPOSE_CUSTOM_CLASS_CONST(name, value) zend_declare_class_constant_long( IntlDateFormatter_ce_ptr, ZEND_STRS( name ) - 1, value );
- #define DATEFORMATTER_EXPOSE_UCAL_CLASS_CONST(x) zend_declare_class_constant_long( IntlDateFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UCAL_##x TSRMLS_CC );
+ #define DATEFORMATTER_EXPOSE_UCAL_CLASS_CONST(x) zend_declare_class_constant_long( IntlDateFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UCAL_##x );
/* UDateFormatStyle constants */
DATEFORMATTER_EXPOSE_CLASS_CONST( FULL );
@@ -74,11 +74,11 @@ PHP_FUNCTION( datefmt_get_error_code )
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
&object, IntlDateFormatter_ce_ptr ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_get_error_code: unable to parse input params", 0 TSRMLS_CC );
+ "datefmt_get_error_code: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -100,11 +100,11 @@ PHP_FUNCTION( datefmt_get_error_message )
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
&object, IntlDateFormatter_ce_ptr ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_get_error_message: unable to parse input params", 0 TSRMLS_CC );
+ "datefmt_get_error_message: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -112,7 +112,7 @@ PHP_FUNCTION( datefmt_get_error_message )
dfo = Z_INTL_DATEFORMATTER_P( object );
/* Return last error message. */
- message = intl_error_get_message( INTL_DATA_ERROR_P(dfo) TSRMLS_CC );
+ message = intl_error_get_message( INTL_DATA_ERROR_P(dfo) );
RETURN_STR( message);
}
/* }}} */
diff --git a/ext/intl/dateformat/dateformat_attr.c b/ext/intl/dateformat/dateformat_attr.c
index 314ae730c7..ee8b91dbed 100644
--- a/ext/intl/dateformat/dateformat_attr.c
+++ b/ext/intl/dateformat/dateformat_attr.c
@@ -36,10 +36,10 @@ PHP_FUNCTION( datefmt_get_datetype )
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE )
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_get_datetype: unable to parse input params", 0 TSRMLS_CC );
+ "datefmt_get_datetype: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -62,10 +62,10 @@ PHP_FUNCTION( datefmt_get_timetype )
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE )
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_get_timetype: unable to parse input params", 0 TSRMLS_CC );
+ "datefmt_get_timetype: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -93,10 +93,10 @@ PHP_FUNCTION( datefmt_get_pattern )
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE )
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O", &object, IntlDateFormatter_ce_ptr ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_get_pattern: unable to parse input params", 0 TSRMLS_CC );
+ "datefmt_get_pattern: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -137,11 +137,11 @@ PHP_FUNCTION( datefmt_set_pattern )
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os",
&object, IntlDateFormatter_ce_ptr, &value, &value_len ) == FAILURE )
{
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_set_pattern: unable to parse input params", 0 TSRMLS_CC);
+ "datefmt_set_pattern: unable to parse input params", 0);
RETURN_FALSE;
}
@@ -175,11 +175,11 @@ PHP_FUNCTION( datefmt_get_locale )
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O|l",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O|l",
&object, IntlDateFormatter_ce_ptr,&loc_type) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_get_locale: unable to parse input params", 0 TSRMLS_CC );
+ "datefmt_get_locale: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -204,11 +204,11 @@ PHP_FUNCTION( datefmt_is_lenient )
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "O",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "O",
&object, IntlDateFormatter_ce_ptr ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_is_lenient: unable to parse input params", 0 TSRMLS_CC );
+ "datefmt_is_lenient: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -232,11 +232,11 @@ PHP_FUNCTION( datefmt_set_lenient )
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ob",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ob",
&object, IntlDateFormatter_ce_ptr,&isLenient ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_set_lenient: unable to parse input params", 0 TSRMLS_CC );
+ "datefmt_set_lenient: unable to parse input params", 0 );
RETURN_FALSE;
}
diff --git a/ext/intl/dateformat/dateformat_attrcpp.cpp b/ext/intl/dateformat/dateformat_attrcpp.cpp
index 71b136c6c1..52df471a10 100644
--- a/ext/intl/dateformat/dateformat_attrcpp.cpp
+++ b/ext/intl/dateformat/dateformat_attrcpp.cpp
@@ -48,10 +48,10 @@ U_CFUNC PHP_FUNCTION(datefmt_get_timezone_id)
int str_len;
DATE_FORMAT_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, IntlDateFormatter_ce_ptr ) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_get_timezone_"
- "id: unable to parse input params", 0 TSRMLS_CC);
+ "id: unable to parse input params", 0);
RETURN_FALSE;
}
@@ -76,10 +76,10 @@ U_CFUNC PHP_FUNCTION(datefmt_get_timezone)
{
DATE_FORMAT_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, IntlDateFormatter_ce_ptr ) == FAILURE) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_get_timezone: unable to parse input params", 0 TSRMLS_CC );
+ "datefmt_get_timezone: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -90,17 +90,17 @@ U_CFUNC PHP_FUNCTION(datefmt_get_timezone)
if (tz_clone == NULL) {
intl_errors_set(INTL_DATA_ERROR_P(dfo), U_MEMORY_ALLOCATION_ERROR,
"datefmt_get_timezone: Out of memory when cloning time zone",
- 0 TSRMLS_CC);
+ 0);
RETURN_FALSE;
}
object_init_ex(return_value, TimeZone_ce_ptr);
- timezone_object_construct(tz_clone, return_value, 1 TSRMLS_CC);
+ timezone_object_construct(tz_clone, return_value, 1);
}
U_CFUNC PHP_FUNCTION(datefmt_set_timezone_id)
{
- php_error_docref0(NULL TSRMLS_CC, E_DEPRECATED,
+ php_error_docref0(NULL, E_DEPRECATED,
"Use datefmt_set_timezone() instead, which also accepts a plain "
"time zone identifier and for which this function is now an "
"alias");
@@ -119,17 +119,17 @@ U_CFUNC PHP_FUNCTION(datefmt_set_timezone)
DATE_FORMAT_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, IntlDateFormatter_ce_ptr, &timezone_zv) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_set_timezone: "
- "unable to parse input params", 0 TSRMLS_CC);
+ "unable to parse input params", 0);
RETURN_FALSE;
}
DATE_FORMAT_METHOD_FETCH_OBJECT;
timezone = timezone_process_timezone_argument(timezone_zv,
- INTL_DATA_ERROR_P(dfo), "datefmt_set_timezone" TSRMLS_CC);
+ INTL_DATA_ERROR_P(dfo), "datefmt_set_timezone");
if (timezone == NULL) {
RETURN_FALSE;
}
@@ -146,10 +146,10 @@ U_CFUNC PHP_FUNCTION(datefmt_get_calendar)
{
DATE_FORMAT_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, IntlDateFormatter_ce_ptr ) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_get_calendar: unable to parse input params", 0 TSRMLS_CC);
+ "datefmt_get_calendar: unable to parse input params", 0);
RETURN_FALSE;
}
@@ -173,11 +173,11 @@ U_CFUNC PHP_FUNCTION(datefmt_get_calendar_object)
{
DATE_FORMAT_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, IntlDateFormatter_ce_ptr ) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"datefmt_get_calendar_object: unable to parse input params",
- 0 TSRMLS_CC);
+ 0);
RETURN_FALSE;
}
@@ -192,11 +192,11 @@ U_CFUNC PHP_FUNCTION(datefmt_get_calendar_object)
if (cal_clone == NULL) {
intl_errors_set(INTL_DATA_ERROR_P(dfo), U_MEMORY_ALLOCATION_ERROR,
"datefmt_get_calendar_object: Out of memory when cloning "
- "calendar", 0 TSRMLS_CC);
+ "calendar", 0);
RETURN_FALSE;
}
- calendar_object_create(return_value, cal_clone TSRMLS_CC);
+ calendar_object_create(return_value, cal_clone);
}
/* }}} */
@@ -210,10 +210,10 @@ U_CFUNC PHP_FUNCTION(datefmt_set_calendar)
zval *calendar_zv;
DATE_FORMAT_METHOD_INIT_VARS;
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oz",
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oz",
&object, IntlDateFormatter_ce_ptr, &calendar_zv) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_set_calendar: unable to parse input params", 0 TSRMLS_CC);
+ "datefmt_set_calendar: unable to parse input params", 0);
RETURN_FALSE;
}
@@ -229,7 +229,7 @@ U_CFUNC PHP_FUNCTION(datefmt_set_calendar)
if (datefmt_process_calendar_arg(calendar_zv, locale,
"datefmt_set_calendar", INTL_DATA_ERROR_P(dfo), cal, cal_type,
- cal_owned TSRMLS_CC) == FAILURE) {
+ cal_owned) == FAILURE) {
RETURN_FALSE;
}
@@ -239,7 +239,7 @@ U_CFUNC PHP_FUNCTION(datefmt_set_calendar)
if (old_timezone == NULL) {
intl_errors_set(INTL_DATA_ERROR_P(dfo), U_MEMORY_ALLOCATION_ERROR,
"datefmt_set_calendar: Out of memory when cloning calendar",
- 0 TSRMLS_CC);
+ 0);
delete cal;
RETURN_FALSE;
}
@@ -249,7 +249,7 @@ U_CFUNC PHP_FUNCTION(datefmt_set_calendar)
if (cal == NULL) {
intl_errors_set(INTL_DATA_ERROR_P(dfo), U_MEMORY_ALLOCATION_ERROR,
"datefmt_set_calendar: Out of memory when cloning calendar",
- 0 TSRMLS_CC);
+ 0);
RETURN_FALSE;
}
}
diff --git a/ext/intl/dateformat/dateformat_class.c b/ext/intl/dateformat/dateformat_class.c
index 0d93338ecd..ef63929a43 100644
--- a/ext/intl/dateformat/dateformat_class.c
+++ b/ext/intl/dateformat/dateformat_class.c
@@ -35,35 +35,35 @@ static zend_object_handlers IntlDateFormatter_handlers;
*/
/* {{{ IntlDateFormatter_objects_dtor */
-static void IntlDateFormatter_object_dtor(zend_object *object TSRMLS_DC )
+static void IntlDateFormatter_object_dtor(zend_object *object )
{
- zend_objects_destroy_object( object TSRMLS_CC );
+ zend_objects_destroy_object( object );
}
/* }}} */
/* {{{ IntlDateFormatter_objects_free */
-void IntlDateFormatter_object_free( zend_object *object TSRMLS_DC )
+void IntlDateFormatter_object_free( zend_object *object )
{
IntlDateFormatter_object* dfo = php_intl_dateformatter_fetch_object(object);
- zend_object_std_dtor( &dfo->zo TSRMLS_CC );
+ zend_object_std_dtor( &dfo->zo );
if (dfo->requested_locale) {
efree( dfo->requested_locale );
}
- dateformat_data_free( &dfo->datef_data TSRMLS_CC );
+ dateformat_data_free( &dfo->datef_data );
}
/* }}} */
/* {{{ IntlDateFormatter_object_create */
-zend_object *IntlDateFormatter_object_create(zend_class_entry *ce TSRMLS_DC)
+zend_object *IntlDateFormatter_object_create(zend_class_entry *ce)
{
IntlDateFormatter_object* intern;
intern = ecalloc( 1, sizeof(IntlDateFormatter_object) + sizeof(zval) * (ce->default_properties_count - 1) );
- dateformat_data_init( &intern->datef_data TSRMLS_CC );
- zend_object_std_init( &intern->zo, ce TSRMLS_CC );
+ dateformat_data_init( &intern->datef_data );
+ zend_object_std_init( &intern->zo, ce );
object_properties_init(&intern->zo, ce);
intern->date_type = 0;
intern->time_type = 0;
@@ -78,28 +78,28 @@ zend_object *IntlDateFormatter_object_create(zend_class_entry *ce TSRMLS_DC)
/* }}} */
/* {{{ IntlDateFormatter_object_clone */
-zend_object *IntlDateFormatter_object_clone(zval *object TSRMLS_DC)
+zend_object *IntlDateFormatter_object_clone(zval *object)
{
IntlDateFormatter_object *dfo, *new_dfo;
zend_object *new_obj;
DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK;
- new_obj = IntlDateFormatter_ce_ptr->create_object(Z_OBJCE_P(object) TSRMLS_CC);
+ new_obj = IntlDateFormatter_ce_ptr->create_object(Z_OBJCE_P(object));
new_dfo = php_intl_dateformatter_fetch_object(new_obj);
/* clone standard parts */
- zend_objects_clone_members(&new_dfo->zo, &dfo->zo TSRMLS_CC);
+ zend_objects_clone_members(&new_dfo->zo, &dfo->zo);
/* clone formatter object */
if (dfo->datef_data.udatf != NULL) {
DATE_FORMAT_OBJECT(new_dfo) = udat_clone(DATE_FORMAT_OBJECT(dfo), &INTL_DATA_ERROR_CODE(dfo));
if (U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
/* set up error in case error handler is interested */
intl_errors_set(INTL_DATA_ERROR_P(dfo), INTL_DATA_ERROR_CODE(dfo),
- "Failed to clone IntlDateFormatter object", 0 TSRMLS_CC );
- zend_throw_exception(NULL, "Failed to clone IntlDateFormatter object", 0 TSRMLS_CC);
+ "Failed to clone IntlDateFormatter object", 0 );
+ zend_throw_exception(NULL, "Failed to clone IntlDateFormatter object", 0);
}
} else {
- zend_throw_exception(NULL, "Cannot clone unconstructed IntlDateFormatter", 0 TSRMLS_CC);
+ zend_throw_exception(NULL, "Cannot clone unconstructed IntlDateFormatter", 0);
}
return new_obj;
}
@@ -188,14 +188,14 @@ static zend_function_entry IntlDateFormatter_class_functions[] = {
/* {{{ dateformat_register_class
* Initialize 'IntlDateFormatter' class
*/
-void dateformat_register_IntlDateFormatter_class( TSRMLS_D )
+void dateformat_register_IntlDateFormatter_class( void )
{
zend_class_entry ce;
/* Create and register 'IntlDateFormatter' class. */
INIT_CLASS_ENTRY( ce, "IntlDateFormatter", IntlDateFormatter_class_functions );
ce.create_object = IntlDateFormatter_object_create;
- IntlDateFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );
+ IntlDateFormatter_ce_ptr = zend_register_internal_class( &ce );
memcpy(&IntlDateFormatter_handlers, zend_get_std_object_handlers(),
sizeof IntlDateFormatter_handlers);
diff --git a/ext/intl/dateformat/dateformat_class.h b/ext/intl/dateformat/dateformat_class.h
index ebd057022e..e96a20b5ee 100644
--- a/ext/intl/dateformat/dateformat_class.h
+++ b/ext/intl/dateformat/dateformat_class.h
@@ -37,7 +37,7 @@ static inline IntlDateFormatter_object *php_intl_dateformatter_fetch_object(zend
}
#define Z_INTL_DATEFORMATTER_P(zv) php_intl_dateformatter_fetch_object(Z_OBJ_P(zv))
-void dateformat_register_IntlDateFormatter_class( TSRMLS_D );
+void dateformat_register_IntlDateFormatter_class( void );
extern zend_class_entry *IntlDateFormatter_ce_ptr;
/* Auxiliary macros */
@@ -48,7 +48,7 @@ extern zend_class_entry *IntlDateFormatter_ce_ptr;
DATE_FORMAT_METHOD_FETCH_OBJECT_NO_CHECK; \
if (dfo->datef_data.udatf == NULL) \
{ \
- intl_errors_set(&dfo->datef_data.error, U_ILLEGAL_ARGUMENT_ERROR, "Found unconstructed IntlDateFormatter", 0 TSRMLS_CC); \
+ intl_errors_set(&dfo->datef_data.error, U_ILLEGAL_ARGUMENT_ERROR, "Found unconstructed IntlDateFormatter", 0); \
RETURN_FALSE; \
}
diff --git a/ext/intl/dateformat/dateformat_create.cpp b/ext/intl/dateformat/dateformat_create.cpp
index 4a272aa45f..9a90029ca1 100644
--- a/ext/intl/dateformat/dateformat_create.cpp
+++ b/ext/intl/dateformat/dateformat_create.cpp
@@ -58,21 +58,21 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
int slength = 0;
IntlDateFormatter_object* dfo;
- intl_error_reset(NULL TSRMLS_CC);
+ intl_error_reset(NULL);
object = return_value;
/* Parse parameters. */
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "sll|zzs",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "sll|zzs",
&locale_str, &locale_len, &date_type, &time_type, &timezone_zv,
&calendar_zv, &pattern_str, &pattern_str_len) == FAILURE) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_create: "
- "unable to parse input parameters", 0 TSRMLS_CC);
+ "unable to parse input parameters", 0);
Z_OBJ_P(return_value) = NULL;
return;
}
INTL_CHECK_LOCALE_LEN_OBJ(locale_len, return_value);
if (locale_len == 0) {
- locale_str = intl_locale_get_default(TSRMLS_C);
+ locale_str = intl_locale_get_default();
}
locale = Locale::createFromName(locale_str);
@@ -80,14 +80,14 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
if (DATE_FORMAT_OBJECT(dfo) != NULL) {
intl_errors_set(INTL_DATA_ERROR_P(dfo), U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_create: cannot call constructor twice", 0 TSRMLS_CC);
+ "datefmt_create: cannot call constructor twice", 0);
return;
}
/* process calendar */
if (datefmt_process_calendar_arg(calendar_zv, locale, "datefmt_create",
INTL_DATA_ERROR_P(dfo), calendar, calendar_type,
- calendar_owned TSRMLS_CC)
+ calendar_owned)
== FAILURE) {
goto error;
}
@@ -98,7 +98,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
if (explicit_tz || calendar_owned ) {
//we have an explicit time zone or a non-object calendar
timezone = timezone_process_timezone_argument(timezone_zv,
- INTL_DATA_ERROR_P(dfo), "datefmt_create" TSRMLS_CC);
+ INTL_DATA_ERROR_P(dfo), "datefmt_create");
if (timezone == NULL) {
goto error;
}
@@ -111,7 +111,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
if (U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
/* object construction -> only set global error */
intl_error_set(NULL, INTL_DATA_ERROR_CODE(dfo), "datefmt_create: "
- "error converting pattern to UTF-16", 0 TSRMLS_CC);
+ "error converting pattern to UTF-16", 0);
goto error;
}
}
@@ -140,7 +140,7 @@ static void datefmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
}
} else {
intl_error_set(NULL, INTL_DATA_ERROR_CODE(dfo), "datefmt_create: date "
- "formatter creation failed", 0 TSRMLS_CC);
+ "formatter creation failed", 0);
goto error;
}
@@ -160,7 +160,7 @@ error:
if (calendar != NULL && calendar_owned) {
delete calendar;
}
- if (U_FAILURE(intl_error_get_code(NULL TSRMLS_CC))) {
+ if (U_FAILURE(intl_error_get_code(NULL))) {
/* free_object handles partially constructed instances fine */
Z_OBJ_P(return_value) = NULL;
}
@@ -195,7 +195,7 @@ U_CFUNC PHP_METHOD( IntlDateFormatter, __construct )
datefmt_ctor(INTERNAL_FUNCTION_PARAM_PASSTHRU);
if (Z_TYPE_P(return_value) == IS_OBJECT && Z_OBJ_P(return_value) == NULL) {
- zend_object_store_ctor_failed(Z_OBJ(orig_this) TSRMLS_CC);
+ zend_object_store_ctor_failed(Z_OBJ(orig_this));
zval_dtor(&orig_this);
ZEND_CTOR_MAKE_NULL();
}
diff --git a/ext/intl/dateformat/dateformat_data.c b/ext/intl/dateformat/dateformat_data.c
index 509e91b617..04d37aa7ac 100644
--- a/ext/intl/dateformat/dateformat_data.c
+++ b/ext/intl/dateformat/dateformat_data.c
@@ -22,20 +22,20 @@
/* {{{ void dateformat_data_init( dateformat_data* datef_data )
* Initialize internals of dateformat_data.
*/
-void dateformat_data_init( dateformat_data* datef_data TSRMLS_DC )
+void dateformat_data_init( dateformat_data* datef_data )
{
if( !datef_data )
return;
datef_data->udatf = NULL;
- intl_error_reset( &datef_data->error TSRMLS_CC );
+ intl_error_reset( &datef_data->error );
}
/* }}} */
/* {{{ void dateformat_data_free( dateformat_data* datef_data )
* Clean up memory allocated for dateformat_data
*/
-void dateformat_data_free( dateformat_data* datef_data TSRMLS_DC )
+void dateformat_data_free( dateformat_data* datef_data )
{
if( !datef_data )
return;
@@ -44,18 +44,18 @@ void dateformat_data_free( dateformat_data* datef_data TSRMLS_DC )
udat_close( datef_data->udatf );
datef_data->udatf = NULL;
- intl_error_reset( &datef_data->error TSRMLS_CC );
+ intl_error_reset( &datef_data->error );
}
/* }}} */
/* {{{ dateformat_data* dateformat_data_create()
* Allocate memory for dateformat_data and initialize it with default values.
*/
-dateformat_data* dateformat_data_create( TSRMLS_D )
+dateformat_data* dateformat_data_create( void )
{
dateformat_data* datef_data = ecalloc( 1, sizeof(dateformat_data) );
- dateformat_data_init( datef_data TSRMLS_CC );
+ dateformat_data_init( datef_data );
return datef_data;
}
diff --git a/ext/intl/dateformat/dateformat_data.h b/ext/intl/dateformat/dateformat_data.h
index a49da7dc89..aaf61e6266 100644
--- a/ext/intl/dateformat/dateformat_data.h
+++ b/ext/intl/dateformat/dateformat_data.h
@@ -30,8 +30,8 @@ typedef struct {
UDateFormat * udatf;
} dateformat_data;
-dateformat_data* dateformat_data_create( TSRMLS_D );
-void dateformat_data_init( dateformat_data* datef_data TSRMLS_DC );
-void dateformat_data_free( dateformat_data* datef_data TSRMLS_DC );
+dateformat_data* dateformat_data_create( void );
+void dateformat_data_init( dateformat_data* datef_data );
+void dateformat_data_free( dateformat_data* datef_data );
#endif // DATE_FORMAT_DATA_H
diff --git a/ext/intl/dateformat/dateformat_format.c b/ext/intl/dateformat/dateformat_format.c
index d11eb2df24..61c3627cb8 100644
--- a/ext/intl/dateformat/dateformat_format.c
+++ b/ext/intl/dateformat/dateformat_format.c
@@ -32,7 +32,7 @@
/* {{{
* Internal function which calls the udat_format
*/
-static void internal_format(IntlDateFormatter_object *dfo, UDate timestamp, zval *return_value TSRMLS_DC)
+static void internal_format(IntlDateFormatter_object *dfo, UDate timestamp, zval *return_value)
{
UChar* formatted = NULL;
int32_t resultlengthneeded =0 ;
@@ -60,7 +60,7 @@ static void internal_format(IntlDateFormatter_object *dfo, UDate timestamp, zval
* Internal function which fetches an element from the passed array for the key_name passed
*/
static int32_t internal_get_arr_ele(IntlDateFormatter_object *dfo,
- HashTable* hash_arr, char* key_name, intl_error *err TSRMLS_DC)
+ HashTable* hash_arr, char* key_name, intl_error *err)
{
zval *ele_value = NULL;
int32_t result = 0;
@@ -74,7 +74,7 @@ static int32_t internal_get_arr_ele(IntlDateFormatter_object *dfo,
if(Z_TYPE_P(ele_value) != IS_LONG) {
spprintf(&message, 0, "datefmt_format: parameter array contains "
"a non-integer element for key '%s'", key_name);
- intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, message, 1);
efree(message);
} else {
if (Z_LVAL_P(ele_value) > INT32_MAX ||
@@ -82,7 +82,7 @@ static int32_t internal_get_arr_ele(IntlDateFormatter_object *dfo,
spprintf(&message, 0, "datefmt_format: value %pd is out of "
"bounds for a 32-bit integer in key '%s'",
Z_LVAL_P(ele_value), key_name);
- intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, message, 1 TSRMLS_CC);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, message, 1);
efree(message);
} else {
result = Z_LVAL_P(ele_value);
@@ -98,7 +98,7 @@ static int32_t internal_get_arr_ele(IntlDateFormatter_object *dfo,
* Internal function which sets UCalendar from the passed array and retrieves timestamp
*/
static UDate internal_get_timestamp(IntlDateFormatter_object *dfo,
- HashTable *hash_arr TSRMLS_DC)
+ HashTable *hash_arr)
{
int32_t year,
month,
@@ -111,7 +111,7 @@ static UDate internal_get_timestamp(IntlDateFormatter_object *dfo,
intl_error *err = &dfo->datef_data.error;
#define INTL_GET_ELEM(elem) \
- internal_get_arr_ele(dfo, hash_arr, (elem), err TSRMLS_CC)
+ internal_get_arr_ele(dfo, hash_arr, (elem), err)
/* Fetch values from the incoming array */
year = INTL_GET_ELEM(CALENDAR_YEAR) + 1900; /* tm_year is years since 1900 */
@@ -130,7 +130,7 @@ static UDate internal_get_timestamp(IntlDateFormatter_object *dfo,
if (INTL_DATA_ERROR_CODE(dfo) != U_ZERO_ERROR) {
intl_errors_set(err, INTL_DATA_ERROR_CODE(dfo), "datefmt_format: "
- "error cloning calendar", 0 TSRMLS_CC);
+ "error cloning calendar", 0);
return 0;
}
@@ -158,10 +158,10 @@ PHP_FUNCTION(datefmt_format)
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
- if (zend_parse_method_parameters(ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oz",
+ if (zend_parse_method_parameters(ZEND_NUM_ARGS(), getThis(), "Oz",
&object, IntlDateFormatter_ce_ptr, &zarg) == FAILURE) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_format: unable "
- "to parse input params", 0 TSRMLS_CC );
+ "to parse input params", 0 );
RETURN_FALSE;
}
@@ -173,17 +173,17 @@ PHP_FUNCTION(datefmt_format)
RETURN_FALSE;
}
- timestamp = internal_get_timestamp(dfo, hash_arr TSRMLS_CC);
+ timestamp = internal_get_timestamp(dfo, hash_arr);
INTL_METHOD_CHECK_STATUS(dfo, "datefmt_format: date formatting failed")
} else {
timestamp = intl_zval_to_millis(zarg, INTL_DATA_ERROR_P(dfo),
- "datefmt_format" TSRMLS_CC);
+ "datefmt_format");
if (U_FAILURE(INTL_DATA_ERROR_CODE(dfo))) {
RETURN_FALSE;
}
}
- internal_format( dfo, timestamp, return_value TSRMLS_CC);
+ internal_format( dfo, timestamp, return_value);
}
/* }}} */
diff --git a/ext/intl/dateformat/dateformat_format_object.cpp b/ext/intl/dateformat/dateformat_format_object.cpp
index b552ed7529..fe38a71287 100644
--- a/ext/intl/dateformat/dateformat_format_object.cpp
+++ b/ext/intl/dateformat/dateformat_format_object.cpp
@@ -73,13 +73,13 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
DateFormat::EStyle dateStyle = DateFormat::kDefault,
timeStyle = DateFormat::kDefault;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "o|zs!",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "o|zs!",
&object, &format, &locale_str, &locale_len) == FAILURE) {
RETURN_FALSE;
}
if (!locale_str) {
- locale_str = intl_locale_get_default(TSRMLS_C);
+ locale_str = intl_locale_get_default();
}
if (format == NULL || Z_TYPE_P(format) == IS_NULL) {
@@ -91,7 +91,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
if (zend_hash_num_elements(ht) != 2) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"datefmt_format_object: bad format; if array, it must have "
- "two elements", 0 TSRMLS_CC);
+ "two elements", 0);
RETURN_FALSE;
}
@@ -100,7 +100,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
if (!valid_format(z)) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"datefmt_format_object: bad format; the date format (first "
- "element of the array) is not valid", 0 TSRMLS_CC);
+ "element of the array) is not valid", 0);
RETURN_FALSE;
}
dateStyle = (DateFormat::EStyle)Z_LVAL_P(z);
@@ -110,7 +110,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
if (!valid_format(z)) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"datefmt_format_object: bad format; the time format ("
- "second element of the array) is not valid", 0 TSRMLS_CC);
+ "second element of the array) is not valid", 0);
RETURN_FALSE;
}
timeStyle = (DateFormat::EStyle)Z_LVAL_P(z);
@@ -118,7 +118,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
if (!valid_format(format)) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"datefmt_format_object: the date/time format type is invalid",
- 0 TSRMLS_CC);
+ 0);
RETURN_FALSE;
}
dateStyle = timeStyle = (DateFormat::EStyle)Z_LVAL_P(format);
@@ -126,7 +126,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
convert_to_string_ex(format);
if (Z_STRLEN_P(format) == 0) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "datefmt_format_object: the format is empty", 0 TSRMLS_CC);
+ "datefmt_format_object: the format is empty", 0);
RETURN_FALSE;
}
pattern = true;
@@ -136,12 +136,12 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
timeStyle = (DateFormat::EStyle)(timeStyle & ~DateFormat::kRelative);
zend_class_entry *instance_ce = Z_OBJCE_P(object);
- if (instanceof_function(instance_ce, Calendar_ce_ptr TSRMLS_CC)) {
- Calendar *obj_cal = calendar_fetch_native_calendar(object TSRMLS_CC);
+ if (instanceof_function(instance_ce, Calendar_ce_ptr)) {
+ Calendar *obj_cal = calendar_fetch_native_calendar(object);
if (obj_cal == NULL) {
intl_error_set(NULL, U_ILLEGAL_ARGUMENT_ERROR,
"datefmt_format_object: bad IntlCalendar instance: "
- "not initialized properly", 0 TSRMLS_CC);
+ "not initialized properly", 0);
RETURN_FALSE;
}
timeZone = obj_cal->getTimeZone().clone();
@@ -149,28 +149,28 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
if (U_FAILURE(status)) {
intl_error_set(NULL, status,
"datefmt_format_object: error obtaining instant from "
- "IntlCalendar", 0 TSRMLS_CC);
+ "IntlCalendar", 0);
RETVAL_FALSE;
goto cleanup;
}
cal = obj_cal->clone();
- } else if (instanceof_function(instance_ce, php_date_get_date_ce() TSRMLS_CC)) {
+ } else if (instanceof_function(instance_ce, php_date_get_date_ce())) {
if (intl_datetime_decompose(object, &date, &timeZone, NULL,
- "datefmt_format_object" TSRMLS_CC) == FAILURE) {
+ "datefmt_format_object") == FAILURE) {
RETURN_FALSE;
}
cal = new GregorianCalendar(Locale::createFromName(locale_str), status);
if (U_FAILURE(status)) {
intl_error_set(NULL, status,
"datefmt_format_object: could not create GregorianCalendar",
- 0 TSRMLS_CC);
+ 0);
RETVAL_FALSE;
goto cleanup;
}
} else {
intl_error_set(NULL, status, "datefmt_format_object: the passed object "
"must be an instance of either IntlCalendar or DateTime",
- 0 TSRMLS_CC);
+ 0);
RETURN_FALSE;
}
@@ -184,7 +184,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
if (U_FAILURE(status)) {
intl_error_set(NULL, status,
"datefmt_format_object: could not create SimpleDateFormat",
- 0 TSRMLS_CC);
+ 0);
RETVAL_FALSE;
goto cleanup;
}
@@ -195,7 +195,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
if (df == NULL) { /* according to ICU sources, this should never happen */
intl_error_set(NULL, status,
"datefmt_format_object: could not create DateFormat",
- 0 TSRMLS_CC);
+ 0);
RETVAL_FALSE;
goto cleanup;
}
@@ -216,7 +216,7 @@ U_CFUNC PHP_FUNCTION(datefmt_format_object)
if (intl_charFromString(result, &ret_str, &ret_str_len, &status) == FAILURE) {
intl_error_set(NULL, status,
"datefmt_format_object: error converting result to UTF-8",
- 0 TSRMLS_CC);
+ 0);
RETVAL_FALSE;
goto cleanup;
}
diff --git a/ext/intl/dateformat/dateformat_helpers.cpp b/ext/intl/dateformat/dateformat_helpers.cpp
index b3f134a4f1..959afa8d82 100644
--- a/ext/intl/dateformat/dateformat_helpers.cpp
+++ b/ext/intl/dateformat/dateformat_helpers.cpp
@@ -34,7 +34,7 @@ int datefmt_process_calendar_arg(zval* calendar_zv,
intl_error *err,
Calendar*& cal,
zend_long& cal_int_type,
- bool& calendar_owned TSRMLS_DC)
+ bool& calendar_owned)
{
char *msg;
UErrorCode status = UErrorCode();
@@ -56,7 +56,7 @@ int datefmt_process_calendar_arg(zval* calendar_zv,
"calendar) or IntlDateFormatter::GREGORIAN. "
"Alternatively, it can be an IntlCalendar object",
func_name);
- intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, msg, 1);
efree(msg);
return FAILURE;
} else if (v == (zend_long)UCAL_TRADITIONAL) {
@@ -70,13 +70,13 @@ int datefmt_process_calendar_arg(zval* calendar_zv,
} else if (Z_TYPE_P(calendar_zv) == IS_OBJECT &&
instanceof_function_ex(Z_OBJCE_P(calendar_zv),
- Calendar_ce_ptr, 0 TSRMLS_CC)) {
+ Calendar_ce_ptr, 0)) {
- cal = calendar_fetch_native_calendar(calendar_zv TSRMLS_CC);
+ cal = calendar_fetch_native_calendar(calendar_zv);
if (cal == NULL) {
spprintf(&msg, 0, "%s: Found unconstructed IntlCalendar object",
func_name);
- intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, msg, 1);
efree(msg);
return FAILURE;
}
@@ -87,7 +87,7 @@ int datefmt_process_calendar_arg(zval* calendar_zv,
} else {
spprintf(&msg, 0, "%s: Invalid calendar argument; should be an integer "
"or an IntlCalendar instance", func_name);
- intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, msg, 1);
efree(msg);
return FAILURE;
}
@@ -97,7 +97,7 @@ int datefmt_process_calendar_arg(zval* calendar_zv,
}
if (U_FAILURE(status)) {
spprintf(&msg, 0, "%s: Failure instantiating calendar", func_name);
- intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, msg, 1 TSRMLS_CC);
+ intl_errors_set(err, U_ILLEGAL_ARGUMENT_ERROR, msg, 1);
efree(msg);
return FAILURE;
}
diff --git a/ext/intl/dateformat/dateformat_helpers.h b/ext/intl/dateformat/dateformat_helpers.h
index c6121d75bb..eb90c99169 100644
--- a/ext/intl/dateformat/dateformat_helpers.h
+++ b/ext/intl/dateformat/dateformat_helpers.h
@@ -33,7 +33,7 @@ int datefmt_process_calendar_arg(zval* calendar_zv,
intl_error *err,
Calendar*& cal,
zend_long& cal_int_type,
- bool& calendar_owned TSRMLS_DC);
+ bool& calendar_owned);
#endif /* DATEFORMAT_HELPERS_H */
diff --git a/ext/intl/dateformat/dateformat_parse.c b/ext/intl/dateformat/dateformat_parse.c
index 15279da3a1..7d12f877e7 100644
--- a/ext/intl/dateformat/dateformat_parse.c
+++ b/ext/intl/dateformat/dateformat_parse.c
@@ -34,7 +34,7 @@
* if set to 1 - store any error encountered in the parameter parse_error
* if set to 0 - no need to store any error encountered in the parameter parse_error
*/
-static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* text_to_parse, int32_t text_len, int32_t *parse_pos, zval *return_value TSRMLS_DC)
+static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* text_to_parse, int32_t text_len, int32_t *parse_pos, zval *return_value)
{
double result = 0;
UDate timestamp =0;
@@ -62,7 +62,7 @@ static void internal_parse_to_timestamp(IntlDateFormatter_object *dfo, char* tex
}
/* }}} */
-static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_value, const UCalendar *parsed_calendar, zend_long calendar_field, char* key_name TSRMLS_DC)
+static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_value, const UCalendar *parsed_calendar, zend_long calendar_field, char* key_name)
{
zend_long calendar_field_val = ucal_get( parsed_calendar, calendar_field, &INTL_DATA_ERROR_CODE(dfo));
INTL_METHOD_CHECK_STATUS( dfo, "Date parsing - localtime failed : could not get a field from calendar" );
@@ -81,7 +81,7 @@ static void add_to_localtime_arr( IntlDateFormatter_object *dfo, zval* return_va
/* {{{
* Internal function which calls the udat_parseCalendar
*/
-static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* text_to_parse, int32_t text_len, int32_t *parse_pos, zval *return_value TSRMLS_DC)
+static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* text_to_parse, int32_t text_len, int32_t *parse_pos, zval *return_value)
{
UCalendar *parsed_calendar = NULL;
UChar* text_utf16 = NULL;
@@ -104,14 +104,14 @@ static void internal_parse_to_localtime(IntlDateFormatter_object *dfo, char* tex
array_init( return_value );
/* Add entries from various fields of the obtained parsed_calendar */
- add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_SECOND, CALENDAR_SEC TSRMLS_CC);
- add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_MINUTE, CALENDAR_MIN TSRMLS_CC);
- add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_HOUR_OF_DAY, CALENDAR_HOUR TSRMLS_CC);
- add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_YEAR, CALENDAR_YEAR TSRMLS_CC);
- add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_DAY_OF_MONTH, CALENDAR_MDAY TSRMLS_CC);
- add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_DAY_OF_WEEK, CALENDAR_WDAY TSRMLS_CC);
- add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_DAY_OF_YEAR, CALENDAR_YDAY TSRMLS_CC);
- add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_MONTH, CALENDAR_MON TSRMLS_CC);
+ add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_SECOND, CALENDAR_SEC);
+ add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_MINUTE, CALENDAR_MIN);
+ add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_HOUR_OF_DAY, CALENDAR_HOUR);
+ add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_YEAR, CALENDAR_YEAR);
+ add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_DAY_OF_MONTH, CALENDAR_MDAY);
+ add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_DAY_OF_WEEK, CALENDAR_WDAY);
+ add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_DAY_OF_YEAR, CALENDAR_YDAY);
+ add_to_localtime_arr( dfo, return_value, parsed_calendar, UCAL_MONTH, CALENDAR_MON);
/* Is in DST? */
isInDST = ucal_inDaylightTime(parsed_calendar , &INTL_DATA_ERROR_CODE(dfo));
@@ -135,9 +135,9 @@ PHP_FUNCTION(datefmt_parse)
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|z/!",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os|z/!",
&object, IntlDateFormatter_ce_ptr, &text_to_parse, &text_len, &z_parse_pos ) == FAILURE ){
- intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_parse: unable to parse input params", 0 TSRMLS_CC );
+ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_parse: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -152,7 +152,7 @@ PHP_FUNCTION(datefmt_parse)
RETURN_FALSE;
}
}
- internal_parse_to_timestamp( dfo, text_to_parse, text_len, z_parse_pos?&parse_pos:NULL, return_value TSRMLS_CC);
+ internal_parse_to_timestamp( dfo, text_to_parse, text_len, z_parse_pos?&parse_pos:NULL, return_value);
if(z_parse_pos) {
zval_dtor(z_parse_pos);
ZVAL_LONG(z_parse_pos, parse_pos);
@@ -174,9 +174,9 @@ PHP_FUNCTION(datefmt_localtime)
DATE_FORMAT_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|z!",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os|z!",
&object, IntlDateFormatter_ce_ptr, &text_to_parse, &text_len, &z_parse_pos ) == FAILURE ){
- intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_parse_to_localtime: unable to parse input params", 0 TSRMLS_CC );
+ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "datefmt_parse_to_localtime: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -191,7 +191,7 @@ PHP_FUNCTION(datefmt_localtime)
RETURN_FALSE;
}
}
- internal_parse_to_localtime( dfo, text_to_parse, text_len, z_parse_pos?&parse_pos:NULL, return_value TSRMLS_CC);
+ internal_parse_to_localtime( dfo, text_to_parse, text_len, z_parse_pos?&parse_pos:NULL, return_value);
if (z_parse_pos) {
zval_dtor(z_parse_pos);
ZVAL_LONG(z_parse_pos, parse_pos);