diff options
Diffstat (limited to 'ext/intl/common/common_date.cpp')
-rw-r--r-- | ext/intl/common/common_date.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/ext/intl/common/common_date.cpp b/ext/intl/common/common_date.cpp index 7c7510d554..885d08cd2c 100644 --- a/ext/intl/common/common_date.cpp +++ b/ext/intl/common/common_date.cpp @@ -127,7 +127,7 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz, if (millis) { ZVAL_STRING(&zfuncname, "getTimestamp"); if (call_user_function(NULL, z, &zfuncname, &retval, 0, NULL TSRMLS_CC) - != SUCCESS || Z_TYPE(retval) != IS_LONG) { + != SUCCESS || Z_TYPE(retval) != IS_INT) { spprintf(&message, 0, "%s: error calling ::getTimeStamp() on the " "object", func); intl_errors_set(err, U_INTERNAL_PROGRAM_ERROR, @@ -137,7 +137,7 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz, return FAILURE; } - *millis = U_MILLIS_PER_SECOND * (double)Z_LVAL(retval); + *millis = U_MILLIS_PER_SECOND * (double)Z_IVAL(retval); zval_ptr_dtor(&zfuncname); } @@ -174,7 +174,7 @@ U_CFUNC int intl_datetime_decompose(zval *z, double *millis, TimeZone **tz, U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func TSRMLS_DC) { double rv = NAN; - long lv; + php_int_t lv; int type; char *message; @@ -184,10 +184,10 @@ U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func TS switch (Z_TYPE_P(z)) { case IS_STRING: - type = is_numeric_string(Z_STRVAL_P(z), Z_STRLEN_P(z), &lv, &rv, 0); + type = is_numeric_string(Z_STRVAL_P(z), Z_STRSIZE_P(z), &lv, &rv, 0); if (type == IS_DOUBLE) { rv *= U_MILLIS_PER_SECOND; - } else if (type == IS_LONG) { + } else if (type == IS_INT) { rv = U_MILLIS_PER_SECOND * (double)lv; } else { spprintf(&message, 0, "%s: string '%s' is not numeric, " @@ -198,8 +198,8 @@ U_CFUNC double intl_zval_to_millis(zval *z, intl_error *err, const char *func TS efree(message); } break; - case IS_LONG: - rv = U_MILLIS_PER_SECOND * (double)Z_LVAL_P(z); + case IS_INT: + rv = U_MILLIS_PER_SECOND * (double)Z_IVAL_P(z); break; case IS_DOUBLE: rv = U_MILLIS_PER_SECOND * Z_DVAL_P(z); |