From 82f3d3658315513bdb8136371c6b46ea6297eb22 Mon Sep 17 00:00:00 2001 From: Stanislav Malyshev Date: Mon, 29 Dec 2014 02:17:15 -0800 Subject: cleanup intl types --- ext/intl/msgformat/msgformat_helpers.cpp | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) (limited to 'ext/intl/msgformat/msgformat_helpers.cpp') diff --git a/ext/intl/msgformat/msgformat_helpers.cpp b/ext/intl/msgformat/msgformat_helpers.cpp index 93c4290601..76fdc3847b 100644 --- a/ext/intl/msgformat/msgformat_helpers.cpp +++ b/ext/intl/msgformat/msgformat_helpers.cpp @@ -363,7 +363,7 @@ static void umsg_set_timezone(MessageFormatter_object *mfo, U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo, HashTable *args, UChar **formatted, - int *formatted_len) + int32_t *formatted_len) { int arg_count = zend_hash_num_elements(args); std::vector fargs; @@ -388,7 +388,7 @@ U_CFUNC void umsg_format_helper(MessageFormatter_object *mfo, // Key related variables zend_string *str_index; - zend_ulong num_index; + zend_ulong num_index; ZEND_HASH_FOREACH_KEY_VAL(args, num_index, str_index, elem) { Formattable& formattable = fargs[argNum]; @@ -537,10 +537,9 @@ retry_kint64: double dd = intl_zval_to_millis(elem, &err, "msgfmt_format"); if (U_FAILURE(err.code)) { char *message, *key_char; - int key_len; + size_t key_len; UErrorCode status = UErrorCode(); - if (intl_charFromString(key, &key_char, &key_len, - &status) == SUCCESS) { + if (intl_charFromString(key, &key_char, &key_len, &status) == SUCCESS) { spprintf(&message, 0, "The argument for key '%s' " "cannot be used as a date or time", key_char); intl_errors_set(&err, err.code, message, 1); @@ -581,7 +580,7 @@ retry_kint64: default: { char *message, *key_char; - int key_len; + size_t key_len; UErrorCode status = UErrorCode(); if (intl_charFromString(key, &key_char, &key_len, &status) == SUCCESS) { @@ -628,7 +627,7 @@ retry_kint64: #define cleanup_zvals() for(int j=i;j>=0;j--) { zval_ptr_dtor((*args)+i); } -U_CFUNC void umsg_parse_helper(UMessageFormat *fmt, int *count, zval **args, UChar *source, int source_len, UErrorCode *status) +U_CFUNC void umsg_parse_helper(UMessageFormat *fmt, int *count, zval **args, UChar *source, int32_t source_len, UErrorCode *status) { UnicodeString srcString(source, source_len); Formattable *fargs = ((const MessageFormat*)fmt)->parse(srcString, *count, *status); @@ -645,7 +644,7 @@ U_CFUNC void umsg_parse_helper(UMessageFormat *fmt, int *count, zval **args, UCh double aDate; UnicodeString temp; char *stmp; - int stmp_len; + size_t stmp_len; switch(fargs[i].getType()) { case Formattable::kDate: -- cgit v1.2.1