diff options
author | Anatol Belski <ab@php.net> | 2014-08-19 08:07:31 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-08-19 08:07:31 +0200 |
commit | 63d3f0b844b3a5f1c94be3c97bca29235dc2b3fc (patch) | |
tree | e561a58d6e084c5e4cbdde1f84aed16cf4724383 /ext/intl/breakiterator/breakiterator_iterators.cpp | |
parent | 1e8273964fbd517a2eb9e560f9cdb4afffa0c034 (diff) | |
download | php-git-63d3f0b844b3a5f1c94be3c97bca29235dc2b3fc.tar.gz |
basic macro replacements, all at once
Diffstat (limited to 'ext/intl/breakiterator/breakiterator_iterators.cpp')
-rw-r--r-- | ext/intl/breakiterator/breakiterator_iterators.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/ext/intl/breakiterator/breakiterator_iterators.cpp b/ext/intl/breakiterator/breakiterator_iterators.cpp index 7783235d8d..efd5c27811 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_LONG(&zoi_iter->current, (long)pos); + ZVAL_INT(&zoi_iter->current, (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_LONG(&zoi_iter->current, (long)pos); + ZVAL_INT(&zoi_iter->current, (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_LONG(key, iter->index); + ZVAL_INT(key, iter->index); } static void _breakiterator_parts_move_forward(zend_object_iterator *iter TSRMLS_DC) @@ -168,7 +168,7 @@ 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_STRLEN(bio->text); + int32_t slen = Z_STRSIZE(bio->text); zend_string *res; if (next == BreakIterator::DONE) { @@ -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_long(IntlPartsIterator_ce_ptr, #name, \ + zend_declare_class_constant_int(IntlPartsIterator_ce_ptr, #name, \ sizeof(#name) - 1, PARTS_ITERATOR_ ## name TSRMLS_CC) PARTSITER_DECL_LONG_CONST(KEY_SEQUENTIAL); |