diff options
Diffstat (limited to 'ext/intl/breakiterator/breakiterator_iterators.cpp')
-rw-r--r-- | ext/intl/breakiterator/breakiterator_iterators.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/ext/intl/breakiterator/breakiterator_iterators.cpp b/ext/intl/breakiterator/breakiterator_iterators.cpp index c04e33e11b..d8f18f99f3 100644 --- a/ext/intl/breakiterator/breakiterator_iterators.cpp +++ b/ext/intl/breakiterator/breakiterator_iterators.cpp @@ -67,7 +67,7 @@ static void _breakiterator_move_forward(zend_object_iterator *iter TSRMLS_DC) int32_t pos = biter->next(); if (pos != BreakIterator::DONE) { - ZVAL_INT(&zoi_iter->current, (php_int_t)pos); + ZVAL_LONG(&zoi_iter->current, (zend_long)pos); } //else we've reached the end of the enum, nothing more is required } @@ -77,7 +77,7 @@ static void _breakiterator_rewind(zend_object_iterator *iter TSRMLS_DC) zoi_with_current *zoi_iter = (zoi_with_current*)iter; int32_t pos = biter->first(); - ZVAL_INT(&zoi_iter->current, (php_int_t)pos); + ZVAL_LONG(&zoi_iter->current, (zend_long)pos); } static zend_object_iterator_funcs breakiterator_iterator_funcs = { @@ -137,7 +137,7 @@ static void _breakiterator_parts_destroy_it(zend_object_iterator *iter TSRMLS_DC static void _breakiterator_parts_get_current_key(zend_object_iterator *iter, zval *key TSRMLS_DC) { /* the actual work is done in move_forward and rewind */ - ZVAL_INT(key, iter->index); + ZVAL_LONG(key, iter->index); } static void _breakiterator_parts_move_forward(zend_object_iterator *iter TSRMLS_DC) @@ -168,14 +168,14 @@ static void _breakiterator_parts_move_forward(zend_object_iterator *iter TSRMLS_ * No need to do anything, the engine increments ->index */ const char *s = Z_STRVAL(bio->text); - int32_t slen = Z_STRSIZE(bio->text); + int32_t slen = Z_STRLEN(bio->text); zend_string *res; if (next == BreakIterator::DONE) { next = slen; } assert(next <= slen && next >= cur); - res = STR_ALLOC(next - cur, 0); + res = zend_string_alloc(next - cur, 0); memcpy(res->val, &s[cur], res->len); res->val[res->len] = '\0'; @@ -315,7 +315,7 @@ U_CFUNC void breakiterator_register_IntlPartsIterator_class(TSRMLS_D) IntlPartsIterator_handlers.get_method = IntlPartsIterator_get_method; #define PARTSITER_DECL_LONG_CONST(name) \ - zend_declare_class_constant_int(IntlPartsIterator_ce_ptr, #name, \ + zend_declare_class_constant_long(IntlPartsIterator_ce_ptr, #name, \ sizeof(#name) - 1, PARTS_ITERATOR_ ## name TSRMLS_CC) PARTSITER_DECL_LONG_CONST(KEY_SEQUENTIAL); |