summaryrefslogtreecommitdiff
path: root/ext/intl/formatter/formatter_parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/intl/formatter/formatter_parse.c')
-rw-r--r--ext/intl/formatter/formatter_parse.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/ext/intl/formatter/formatter_parse.c b/ext/intl/formatter/formatter_parse.c
index 57ab4e28d8..3d0c84dab6 100644
--- a/ext/intl/formatter/formatter_parse.c
+++ b/ext/intl/formatter/formatter_parse.c
@@ -36,7 +36,7 @@
*/
PHP_FUNCTION( numfmt_parse )
{
- long type = FORMAT_TYPE_DOUBLE;
+ php_int_t type = FORMAT_TYPE_DOUBLE;
UChar* sstr = NULL;
int sstr_len = 0;
char* str = NULL;
@@ -50,7 +50,7 @@ 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() TSRMLS_CC, getThis(), "Os|iz/!",
&object, NumberFormatter_ce_ptr, &str, &str_len, &type, &zposition ) == FAILURE )
{
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR,
@@ -86,10 +86,10 @@ PHP_FUNCTION( numfmt_parse )
break;
case FORMAT_TYPE_INT64:
val64 = unum_parseInt64(FORMATTER_OBJECT(nfo), sstr, sstr_len, position_p, &INTL_DATA_ERROR_CODE(nfo));
- if(val64 > LONG_MAX || val64 < LONG_MIN) {
+ if(val64 > ZEND_INT_MAX || val64 < ZEND_INT_MIN) {
RETVAL_DOUBLE(val64);
} else {
- RETVAL_INT((long)val64);
+ RETVAL_INT((php_int_t)val64);
}
break;
case FORMAT_TYPE_DOUBLE: