summaryrefslogtreecommitdiff
path: root/ext/intl/msgformat/msgformat_helpers.cpp
diff options
context:
space:
mode:
authorStanislav Malyshev <stas@php.net>2014-12-29 02:17:15 -0800
committerStanislav Malyshev <stas@php.net>2014-12-29 14:06:12 -0800
commit82f3d3658315513bdb8136371c6b46ea6297eb22 (patch)
tree6bdee5087d8b5a0c75db0ece8e20189cacfc090a /ext/intl/msgformat/msgformat_helpers.cpp
parentee7decb7ff7b8e81b595c01cfb6b5719bb8c520e (diff)
downloadphp-git-82f3d3658315513bdb8136371c6b46ea6297eb22.tar.gz
cleanup intl types
Diffstat (limited to 'ext/intl/msgformat/msgformat_helpers.cpp')
-rw-r--r--ext/intl/msgformat/msgformat_helpers.cpp15
1 files changed, 7 insertions, 8 deletions
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<Formattable> 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: