summaryrefslogtreecommitdiff
path: root/ext/intl/formatter
diff options
context:
space:
mode:
authorAnatol Belski <ab@php.net>2014-12-18 10:09:02 +0100
committerAnatol Belski <ab@php.net>2014-12-18 10:09:02 +0100
commit4b943c9c0dd4114adc78416c5241f11ad5c98a80 (patch)
treec9628d91eae3f580f9ebd73d2372e4c9089b2e00 /ext/intl/formatter
parent79354ba6d0d6a1a4596f9ac66ee9bc3a34ed972b (diff)
parentdec8eb431adee340fb8dfb9ff33ed29d3279c35f (diff)
downloadphp-git-POST_NATIVE_TLS_MERGE.tar.gz
Merge remote-tracking branch 'origin/native-tls'POST_NATIVE_TLS_MERGE
Diffstat (limited to 'ext/intl/formatter')
-rw-r--r--ext/intl/formatter/formatter.c4
-rw-r--r--ext/intl/formatter/formatter_attr.c40
-rw-r--r--ext/intl/formatter/formatter_class.c34
-rw-r--r--ext/intl/formatter/formatter_class.h4
-rw-r--r--ext/intl/formatter/formatter_data.c12
-rw-r--r--ext/intl/formatter/formatter_data.h6
-rw-r--r--ext/intl/formatter/formatter_format.c24
-rw-r--r--ext/intl/formatter/formatter_main.c18
-rw-r--r--ext/intl/formatter/formatter_parse.c10
9 files changed, 75 insertions, 77 deletions
diff --git a/ext/intl/formatter/formatter.c b/ext/intl/formatter/formatter.c
index bb4d3d2ac5..63664ecc03 100644
--- a/ext/intl/formatter/formatter.c
+++ b/ext/intl/formatter/formatter.c
@@ -41,8 +41,8 @@ void formatter_register_constants( INIT_FUNC_ARGS )
}
#define FORMATTER_EXPOSE_CONST(x) REGISTER_LONG_CONSTANT(#x, x, CONST_PERSISTENT | CONST_CS)
- #define FORMATTER_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long( NumberFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UNUM_##x TSRMLS_CC );
- #define FORMATTER_EXPOSE_CUSTOM_CLASS_CONST(name, value) zend_declare_class_constant_long( NumberFormatter_ce_ptr, ZEND_STRS( name ) - 1, value TSRMLS_CC );
+ #define FORMATTER_EXPOSE_CLASS_CONST(x) zend_declare_class_constant_long( NumberFormatter_ce_ptr, ZEND_STRS( #x ) - 1, UNUM_##x );
+ #define FORMATTER_EXPOSE_CUSTOM_CLASS_CONST(name, value) zend_declare_class_constant_long( NumberFormatter_ce_ptr, ZEND_STRS( name ) - 1, value );
/* UNumberFormatStyle constants */
FORMATTER_EXPOSE_CLASS_CONST( PATTERN_DECIMAL );
diff --git a/ext/intl/formatter/formatter_attr.c b/ext/intl/formatter/formatter_attr.c
index 639342f4af..d3189df6d6 100644
--- a/ext/intl/formatter/formatter_attr.c
+++ b/ext/intl/formatter/formatter_attr.c
@@ -36,11 +36,11 @@ PHP_FUNCTION( numfmt_get_attribute )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ol",
&object, NumberFormatter_ce_ptr, &attribute ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "numfmt_get_attribute: unable to parse input params", 0 TSRMLS_CC );
+ "numfmt_get_attribute: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -109,11 +109,11 @@ PHP_FUNCTION( numfmt_get_text_attribute )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ol",
&object, NumberFormatter_ce_ptr, &attribute ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "numfmt_get_text_attribute: unable to parse input params", 0 TSRMLS_CC );
+ "numfmt_get_text_attribute: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -150,11 +150,11 @@ PHP_FUNCTION( numfmt_set_attribute )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Olz",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Olz",
&object, NumberFormatter_ce_ptr, &attribute, &value ) == FAILURE)
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "numfmt_set_attribute: unable to parse input params", 0 TSRMLS_CC );
+ "numfmt_set_attribute: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -215,11 +215,11 @@ PHP_FUNCTION( numfmt_set_text_attribute )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ols",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ols",
&object, NumberFormatter_ce_ptr, &attribute, &value, &len ) == FAILURE)
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "numfmt_set_text_attribute: unable to parse input params", 0 TSRMLS_CC );
+ "numfmt_set_text_attribute: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -256,17 +256,17 @@ PHP_FUNCTION( numfmt_get_symbol )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ol",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ol",
&object, NumberFormatter_ce_ptr, &symbol ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "numfmt_get_symbol: unable to parse input params", 0 TSRMLS_CC );
+ "numfmt_get_symbol: unable to parse input params", 0 );
RETURN_FALSE;
}
if(symbol >= UNUM_FORMAT_SYMBOL_COUNT || symbol < 0) {
- intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "numfmt_get_symbol: invalid symbol value", 0 TSRMLS_CC );
+ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "numfmt_get_symbol: invalid symbol value", 0 );
RETURN_FALSE;
}
@@ -305,17 +305,17 @@ PHP_FUNCTION( numfmt_set_symbol )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ols",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ols",
&object, NumberFormatter_ce_ptr, &symbol, &value, &value_len ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "numfmt_set_symbol: unable to parse input params", 0 TSRMLS_CC );
+ "numfmt_set_symbol: unable to parse input params", 0 );
RETURN_FALSE;
}
if (symbol >= UNUM_FORMAT_SYMBOL_COUNT || symbol < 0) {
- intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "numfmt_set_symbol: invalid symbol value", 0 TSRMLS_CC );
+ intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "numfmt_set_symbol: invalid symbol value", 0 );
RETURN_FALSE;
}
@@ -350,11 +350,11 @@ PHP_FUNCTION( numfmt_get_pattern )
FORMATTER_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, NumberFormatter_ce_ptr ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "numfmt_get_pattern: unable to parse input params", 0 TSRMLS_CC );
+ "numfmt_get_pattern: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -393,11 +393,11 @@ PHP_FUNCTION( numfmt_set_pattern )
FORMATTER_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, NumberFormatter_ce_ptr, &value, &value_len ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "numfmt_set_pattern: unable to parse input params", 0 TSRMLS_CC );
+ "numfmt_set_pattern: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -431,11 +431,11 @@ PHP_FUNCTION( numfmt_get_locale )
FORMATTER_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, NumberFormatter_ce_ptr, &type ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "numfmt_get_locale: unable to parse input params", 0 TSRMLS_CC );
+ "numfmt_get_locale: unable to parse input params", 0 );
RETURN_FALSE;
}
diff --git a/ext/intl/formatter/formatter_class.c b/ext/intl/formatter/formatter_class.c
index 8fcc155e85..935c51a955 100644
--- a/ext/intl/formatter/formatter_class.c
+++ b/ext/intl/formatter/formatter_class.c
@@ -34,33 +34,31 @@ static zend_object_handlers NumberFormatter_handlers;
*/
/* {{{ NumberFormatter_objects_dtor */
-static void NumberFormatter_object_dtor(
- zend_object *object
- TSRMLS_DC )
+static void NumberFormatter_object_dtor(zend_object *object)
{
- zend_objects_destroy_object( object TSRMLS_CC );
+ zend_objects_destroy_object( object );
}
/* }}} */
/* {{{ NumberFormatter_objects_free */
-void NumberFormatter_object_free( zend_object *object TSRMLS_DC )
+void NumberFormatter_object_free( zend_object *object )
{
NumberFormatter_object* nfo = php_intl_number_format_fetch_object(object);
- zend_object_std_dtor( &nfo->zo TSRMLS_CC );
+ zend_object_std_dtor( &nfo->zo );
- formatter_data_free( &nfo->nf_data TSRMLS_CC );
+ formatter_data_free( &nfo->nf_data );
}
/* }}} */
/* {{{ NumberFormatter_object_create */
-zend_object *NumberFormatter_object_create(zend_class_entry *ce TSRMLS_DC)
+zend_object *NumberFormatter_object_create(zend_class_entry *ce)
{
NumberFormatter_object* intern;
intern = ecalloc( 1, sizeof(NumberFormatter_object) + sizeof(zval) * (ce->default_properties_count - 1) );
- formatter_data_init( &intern->nf_data TSRMLS_CC );
- zend_object_std_init( &intern->zo, ce TSRMLS_CC );
+ formatter_data_init( &intern->nf_data );
+ zend_object_std_init( &intern->zo, ce );
object_properties_init(&intern->zo, ce);
intern->zo.handlers = &NumberFormatter_handlers;
@@ -70,16 +68,16 @@ zend_object *NumberFormatter_object_create(zend_class_entry *ce TSRMLS_DC)
/* }}} */
/* {{{ NumberFormatter_object_clone */
-zend_object *NumberFormatter_object_clone(zval *object TSRMLS_DC)
+zend_object *NumberFormatter_object_clone(zval *object)
{
NumberFormatter_object *nfo, *new_nfo;
zend_object *new_obj;
FORMATTER_METHOD_FETCH_OBJECT_NO_CHECK;
- new_obj = NumberFormatter_ce_ptr->create_object(Z_OBJCE_P(object) TSRMLS_CC);
+ new_obj = NumberFormatter_ce_ptr->create_object(Z_OBJCE_P(object));
new_nfo = php_intl_number_format_fetch_object(new_obj);
/* clone standard parts */
- zend_objects_clone_members(&new_nfo->zo, &nfo->zo TSRMLS_CC);
+ zend_objects_clone_members(&new_nfo->zo, &nfo->zo);
/* clone formatter object. It may fail, the destruction code must handle this case */
if (FORMATTER_OBJECT(nfo) != NULL) {
FORMATTER_OBJECT(new_nfo) = unum_clone(FORMATTER_OBJECT(nfo),
@@ -87,11 +85,11 @@ zend_object *NumberFormatter_object_clone(zval *object TSRMLS_DC)
if (U_FAILURE(INTL_DATA_ERROR_CODE(nfo))) {
/* set up error in case error handler is interested */
intl_errors_set(INTL_DATA_ERROR_P(nfo), INTL_DATA_ERROR_CODE(nfo),
- "Failed to clone NumberFormatter object", 0 TSRMLS_CC);
- zend_throw_exception(NULL, "Failed to clone NumberFormatter object", 0 TSRMLS_CC);
+ "Failed to clone NumberFormatter object", 0);
+ zend_throw_exception(NULL, "Failed to clone NumberFormatter object", 0);
}
} else {
- zend_throw_exception(NULL, "Cannot clone unconstructed NumberFormatter", 0 TSRMLS_CC);
+ zend_throw_exception(NULL, "Cannot clone unconstructed NumberFormatter", 0);
}
return new_obj;
}
@@ -184,14 +182,14 @@ static zend_function_entry NumberFormatter_class_functions[] = {
/* {{{ formatter_register_class
* Initialize 'NumberFormatter' class
*/
-void formatter_register_class( TSRMLS_D )
+void formatter_register_class( void )
{
zend_class_entry ce;
/* Create and register 'NumberFormatter' class. */
INIT_CLASS_ENTRY( ce, "NumberFormatter", NumberFormatter_class_functions );
ce.create_object = NumberFormatter_object_create;
- NumberFormatter_ce_ptr = zend_register_internal_class( &ce TSRMLS_CC );
+ NumberFormatter_ce_ptr = zend_register_internal_class( &ce );
memcpy(&NumberFormatter_handlers, zend_get_std_object_handlers(),
sizeof(NumberFormatter_handlers));
diff --git a/ext/intl/formatter/formatter_class.h b/ext/intl/formatter/formatter_class.h
index 1db688712c..1d6fa817c9 100644
--- a/ext/intl/formatter/formatter_class.h
+++ b/ext/intl/formatter/formatter_class.h
@@ -34,7 +34,7 @@ static inline NumberFormatter_object *php_intl_number_format_fetch_object(zend_o
}
#define Z_INTL_NUMBERFORMATTER_P(zv) php_intl_number_format_fetch_object(Z_OBJ_P(zv))
-void formatter_register_class( TSRMLS_D );
+void formatter_register_class( void );
extern zend_class_entry *NumberFormatter_ce_ptr;
/* Auxiliary macros */
@@ -47,7 +47,7 @@ extern zend_class_entry *NumberFormatter_ce_ptr;
if (FORMATTER_OBJECT(nfo) == NULL) \
{ \
intl_errors_set(&nfo->nf_data.error, U_ILLEGAL_ARGUMENT_ERROR, \
- "Found unconstructed NumberFormatter", 0 TSRMLS_CC); \
+ "Found unconstructed NumberFormatter", 0); \
RETURN_FALSE; \
}
diff --git a/ext/intl/formatter/formatter_data.c b/ext/intl/formatter/formatter_data.c
index 2f785ba68f..46b94ad4ea 100644
--- a/ext/intl/formatter/formatter_data.c
+++ b/ext/intl/formatter/formatter_data.c
@@ -23,20 +23,20 @@
/* {{{ void formatter_data_init( formatter_data* nf_data )
* Initialize internals of formatter_data.
*/
-void formatter_data_init( formatter_data* nf_data TSRMLS_DC )
+void formatter_data_init( formatter_data* nf_data )
{
if( !nf_data )
return;
nf_data->unum = NULL;
- intl_error_reset( &nf_data->error TSRMLS_CC );
+ intl_error_reset( &nf_data->error );
}
/* }}} */
/* {{{ void formatter_data_free( formatter_data* nf_data )
* Clean up mem allocted by internals of formatter_data
*/
-void formatter_data_free( formatter_data* nf_data TSRMLS_DC )
+void formatter_data_free( formatter_data* nf_data )
{
if( !nf_data )
return;
@@ -45,18 +45,18 @@ void formatter_data_free( formatter_data* nf_data TSRMLS_DC )
unum_close( nf_data->unum );
nf_data->unum = NULL;
- intl_error_reset( &nf_data->error TSRMLS_CC );
+ intl_error_reset( &nf_data->error );
}
/* }}} */
/* {{{ formatter_data* formatter_data_create()
* Alloc mem for formatter_data and initialize it with default values.
*/
-formatter_data* formatter_data_create( TSRMLS_D )
+formatter_data* formatter_data_create( void )
{
formatter_data* nf_data = ecalloc( 1, sizeof(formatter_data) );
- formatter_data_init( nf_data TSRMLS_CC );
+ formatter_data_init( nf_data );
return nf_data;
}
diff --git a/ext/intl/formatter/formatter_data.h b/ext/intl/formatter/formatter_data.h
index 0e3bc4fea4..8d1bfd12cd 100644
--- a/ext/intl/formatter/formatter_data.h
+++ b/ext/intl/formatter/formatter_data.h
@@ -31,8 +31,8 @@ typedef struct {
UNumberFormat* unum;
} formatter_data;
-formatter_data* formatter_data_create( TSRMLS_D );
-void formatter_data_init( formatter_data* nf_data TSRMLS_DC );
-void formatter_data_free( formatter_data* nf_data TSRMLS_DC );
+formatter_data* formatter_data_create( void );
+void formatter_data_init( formatter_data* nf_data );
+void formatter_data_free( formatter_data* nf_data );
#endif // FORMATTER_DATA_H
diff --git a/ext/intl/formatter/formatter_format.c b/ext/intl/formatter/formatter_format.c
index 937cb05812..b852e54b3e 100644
--- a/ext/intl/formatter/formatter_format.c
+++ b/ext/intl/formatter/formatter_format.c
@@ -40,11 +40,11 @@ PHP_FUNCTION( numfmt_format )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Oz|l",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Oz|l",
&object, NumberFormatter_ce_ptr, &number, &type ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "numfmt_format: unable to parse input params", 0 TSRMLS_CC );
+ "numfmt_format: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -69,7 +69,7 @@ PHP_FUNCTION( numfmt_format )
if(Z_TYPE_P(number) != IS_DOUBLE && Z_TYPE_P(number) != IS_LONG) {
SEPARATE_ZVAL_IF_NOT_REF(number);
- convert_scalar_to_number(number TSRMLS_CC );
+ convert_scalar_to_number(number );
}
switch(type) {
@@ -78,7 +78,7 @@ PHP_FUNCTION( numfmt_format )
formatted_len = unum_format(FORMATTER_OBJECT(nfo), (int32_t)Z_LVAL_P(number),
formatted, formatted_len, NULL, &INTL_DATA_ERROR_CODE(nfo));
if (INTL_DATA_ERROR_CODE(nfo) == U_BUFFER_OVERFLOW_ERROR) {
- intl_error_reset(INTL_DATA_ERROR_P(nfo) TSRMLS_CC);
+ intl_error_reset(INTL_DATA_ERROR_P(nfo));
formatted = eumalloc(formatted_len);
formatted_len = unum_format(FORMATTER_OBJECT(nfo), (int32_t)Z_LVAL_P(number),
formatted, formatted_len, NULL, &INTL_DATA_ERROR_CODE(nfo));
@@ -94,7 +94,7 @@ PHP_FUNCTION( numfmt_format )
int64_t value = (Z_TYPE_P(number) == IS_DOUBLE)?(int64_t)Z_DVAL_P(number):Z_LVAL_P(number);
formatted_len = unum_formatInt64(FORMATTER_OBJECT(nfo), value, formatted, formatted_len, NULL, &INTL_DATA_ERROR_CODE(nfo));
if (INTL_DATA_ERROR_CODE(nfo) == U_BUFFER_OVERFLOW_ERROR) {
- intl_error_reset(INTL_DATA_ERROR_P(nfo) TSRMLS_CC);
+ intl_error_reset(INTL_DATA_ERROR_P(nfo));
formatted = eumalloc(formatted_len);
formatted_len = unum_formatInt64(FORMATTER_OBJECT(nfo), value, formatted, formatted_len, NULL, &INTL_DATA_ERROR_CODE(nfo));
if (U_FAILURE( INTL_DATA_ERROR_CODE(nfo) ) ) {
@@ -109,7 +109,7 @@ PHP_FUNCTION( numfmt_format )
convert_to_double_ex(number);
formatted_len = unum_formatDouble(FORMATTER_OBJECT(nfo), Z_DVAL_P(number), formatted, formatted_len, NULL, &INTL_DATA_ERROR_CODE(nfo));
if (INTL_DATA_ERROR_CODE(nfo) == U_BUFFER_OVERFLOW_ERROR) {
- intl_error_reset(INTL_DATA_ERROR_P(nfo) TSRMLS_CC);
+ intl_error_reset(INTL_DATA_ERROR_P(nfo));
formatted = eumalloc(formatted_len);
unum_formatDouble(FORMATTER_OBJECT(nfo), Z_DVAL_P(number), formatted, formatted_len, NULL, &INTL_DATA_ERROR_CODE(nfo));
if (U_FAILURE( INTL_DATA_ERROR_CODE(nfo) ) ) {
@@ -120,7 +120,7 @@ PHP_FUNCTION( numfmt_format )
break;
default:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unsupported format type %pd", type);
+ php_error_docref(NULL, E_WARNING, "Unsupported format type %pd", type);
RETURN_FALSE;
break;
}
@@ -147,11 +147,11 @@ PHP_FUNCTION( numfmt_format_currency )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Ods",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Ods",
&object, NumberFormatter_ce_ptr, &number, &currency, &currency_len ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "numfmt_format_currency: unable to parse input params", 0 TSRMLS_CC );
+ "numfmt_format_currency: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -171,14 +171,14 @@ PHP_FUNCTION( numfmt_format_currency )
* and use it to format the number.
*/
if (INTL_DATA_ERROR_CODE(nfo) == U_BUFFER_OVERFLOW_ERROR) {
- intl_error_reset(INTL_DATA_ERROR_P(nfo) TSRMLS_CC);
+ intl_error_reset(INTL_DATA_ERROR_P(nfo));
formatted = eumalloc(formatted_len);
unum_formatDoubleCurrency(FORMATTER_OBJECT(nfo), number, scurrency, formatted, formatted_len, NULL, &INTL_DATA_ERROR_CODE(nfo));
}
if( U_FAILURE( INTL_DATA_ERROR_CODE((nfo)) ) ) {
- intl_error_set_code( NULL, INTL_DATA_ERROR_CODE((nfo)) TSRMLS_CC );
- intl_errors_set_custom_msg( INTL_DATA_ERROR_P(nfo), "Number formatting failed", 0 TSRMLS_CC );
+ intl_error_set_code( NULL, INTL_DATA_ERROR_CODE((nfo)) );
+ intl_errors_set_custom_msg( INTL_DATA_ERROR_P(nfo), "Number formatting failed", 0 );
RETVAL_FALSE;
if (formatted != format_buf) {
efree(formatted);
diff --git a/ext/intl/formatter/formatter_main.c b/ext/intl/formatter/formatter_main.c
index 939a8f782b..067f3bd82b 100644
--- a/ext/intl/formatter/formatter_main.c
+++ b/ext/intl/formatter/formatter_main.c
@@ -36,11 +36,11 @@ static void numfmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_parameters( ZEND_NUM_ARGS() TSRMLS_CC, "sl|s",
+ if( zend_parse_parameters( ZEND_NUM_ARGS(), "sl|s",
&locale, &locale_len, &style, &pattern, &pattern_len ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "numfmt_create: unable to parse input parameters", 0 TSRMLS_CC );
+ "numfmt_create: unable to parse input parameters", 0 );
Z_OBJ_P(return_value) = NULL;
return;
}
@@ -56,7 +56,7 @@ static void numfmt_ctor(INTERNAL_FUNCTION_PARAMETERS)
}
if(locale_len == 0) {
- locale = intl_locale_get_default(TSRMLS_C);
+ locale = intl_locale_get_default();
}
/* Create an ICU number formatter. */
@@ -96,7 +96,7 @@ PHP_METHOD( NumberFormatter, __construct )
numfmt_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();
}
@@ -113,11 +113,11 @@ PHP_FUNCTION( numfmt_get_error_code )
FORMATTER_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, NumberFormatter_ce_ptr ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "numfmt_get_error_code: unable to parse input params", 0 TSRMLS_CC );
+ "numfmt_get_error_code: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -140,11 +140,11 @@ PHP_FUNCTION( numfmt_get_error_message )
FORMATTER_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, NumberFormatter_ce_ptr ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "numfmt_get_error_message: unable to parse input params", 0 TSRMLS_CC );
+ "numfmt_get_error_message: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -152,7 +152,7 @@ PHP_FUNCTION( numfmt_get_error_message )
nfo = Z_INTL_NUMBERFORMATTER_P(object);
/* Return last error message. */
- message = intl_error_get_message( INTL_DATA_ERROR_P(nfo) TSRMLS_CC );
+ message = intl_error_get_message( INTL_DATA_ERROR_P(nfo) );
RETURN_STR(message);
}
/* }}} */
diff --git a/ext/intl/formatter/formatter_parse.c b/ext/intl/formatter/formatter_parse.c
index 0959d11830..b2af74a2e0 100644
--- a/ext/intl/formatter/formatter_parse.c
+++ b/ext/intl/formatter/formatter_parse.c
@@ -50,11 +50,11 @@ PHP_FUNCTION( numfmt_parse )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Os|lz/!",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Os|lz/!",
&object, NumberFormatter_ce_ptr, &str, &str_len, &type, &zposition ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "number_parse: unable to parse input params", 0 TSRMLS_CC );
+ "number_parse: unable to parse input params", 0 );
RETURN_FALSE;
}
@@ -97,7 +97,7 @@ PHP_FUNCTION( numfmt_parse )
RETVAL_DOUBLE(val_double);
break;
default:
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "Unsupported format type %pd", type);
+ php_error_docref(NULL, E_WARNING, "Unsupported format type %pd", type);
RETVAL_FALSE;
break;
}
@@ -139,11 +139,11 @@ PHP_FUNCTION( numfmt_parse_currency )
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
- if( zend_parse_method_parameters( ZEND_NUM_ARGS() TSRMLS_CC, getThis(), "Osz/|z/!",
+ if( zend_parse_method_parameters( ZEND_NUM_ARGS(), getThis(), "Osz/|z/!",
&object, NumberFormatter_ce_ptr, &str, &str_len, &zcurrency, &zposition ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
- "number_parse_currency: unable to parse input params", 0 TSRMLS_CC );
+ "number_parse_currency: unable to parse input params", 0 );
RETURN_FALSE;
}