1
0
mirror of https://github.com/php/php-src.git synced 2026-04-23 16:08:35 +02:00
Commit Graph

48 Commits

Author SHA1 Message Date
Felipe Pena 9c9ee1a71c - Fixed endless loop and segfault 2008-09-12 17:30:53 +00:00
Felipe Pena a1e8d340c3 New macro for check void parameters 2008-02-28 14:16:25 +00:00
Yiduo (David) Wang 95da0dc570 Added macros for managing zval refcounts and is_ref statuses 2007-10-07 05:15:07 +00:00
Dmitry Stogov 8146078f7b Improved memory usage by movig constants to read only memory. (Dmitry, Pierre) 2007-09-27 18:28:44 +00:00
Andrei Zmievski 42b38dc29c Protos. 2006-07-11 20:51:18 +00:00
Andrei Zmievski 62d76d207f Implement getAll() that can be used to get all the pieces defined by the
boundaries.
2006-07-11 19:43:08 +00:00
Andrei Zmievski dd9b227506 Make next() and previous() take optional step parameter and optimize
return value usage.
2006-07-11 17:59:46 +00:00
Andrei Zmievski 12615846a4 Implement getRuleStatus() and getRuleStatusArray() as well as related
constants.
2006-07-11 17:48:14 +00:00
Andrei Zmievski 4187b2e1a5 Use object flags. 2006-07-11 16:20:21 +00:00
Andrei Zmievski dfbf573d5d Implement getAvailableLocales(). 2006-07-10 23:19:05 +00:00
Andrei Zmievski 07bb47a406 Fix validity checks. 2006-07-10 22:12:47 +00:00
Andrei Zmievski 5f19cb01f6 Implement isBoundary() for combining sequences. 2006-07-10 21:42:25 +00:00
Andrei Zmievski f2cbf6f950 Implement following() for combining sequences. 2006-07-10 21:18:01 +00:00
Andrei Zmievski 8dd4e2692c Fix combining sequence iterators for forward and backward movement. 2006-07-10 20:14:12 +00:00
Andrei Zmievski 63ef7fd050 Implement following() and preceding() for codepoint iterators. 2006-07-08 18:46:24 +00:00
Andrei Zmievski 73b131869c Implement isBoundary() for code point iterator. 2006-07-07 22:52:26 +00:00
Andrei Zmievski 4757c4ce46 Implement TextIterator::isBoundary() for break iterators. 2006-07-07 22:34:46 +00:00
Andrei Zmievski abbc1053fd Implement TextIterator methods following() and preceding(). 2006-07-07 21:41:18 +00:00
Andrei Zmievski 769c2a1c1e Try to make combining sequences work. Not entirely succesful. 2006-06-29 12:32:00 +00:00
Andrei Zmievski 01410e5ae5 Fix codepoint iterators 2006-06-28 15:28:55 +00:00
Andrei Zmievski b2b4988c12 Use object's copied text (fixes some bug somehow). 2006-06-28 14:44:36 +00:00
Andrei Zmievski aea38c6ee1 Rework break iterator based implementation to make it more generic for
forward and backwards iterators and to return current elements properly.
2006-06-28 14:12:14 +00:00
Andrei Zmievski ef263f219c A lot of work on making TextIterator support propert codepoint-level
offsets and making it more robust in general.
2006-06-24 21:57:14 +00:00
Andrei Zmievski 72df9946d2 - Remove support for code units in TextIterator (people shouldn't be
examining individual code units anyway)
- Add offset() method.
- Add optional locale parameter to the constructor.
2006-06-24 18:18:38 +00:00
Andrei Zmievski fe0cccc003 Use intern->type for break iterator. 2006-03-24 21:06:36 +00:00
Dmitry Stogov e3b7f3fd0d Unicode support: MS Visual C compatibility 2006-02-26 11:57:14 +00:00
Marcus Boerger f81239a2b3 - Change to offsetof as suggested by Clayton 2006-02-17 08:24:56 +00:00
Marcus Boerger 45820dd7ea - Little speedup + first test 2006-02-15 21:34:21 +00:00
Dmitry Stogov 09ca61c125 Made server wide switch for unicode on/off (according to PDM). 2006-02-13 10:23:59 +00:00
Andrei Zmievski 5418ae7976 Implement character/word/line/sentence iterators and the reverse
counterparts.
2006-02-11 00:16:43 +00:00
Andrei Zmievski 086dec2719 Make ReverseTextIterator a separate class. 2006-02-10 00:23:29 +00:00
Andrei Zmievski dfd6f3e3b8 Reverse iteration for combining sequences. 2006-02-08 00:16:50 +00:00
Andrei Zmievski 1a6b00fc01 Implement reverse iteration for codeunits and codepoints. Combining
sequences are next.

# This is ugly, though.
# foreach (new TextIterator($a, # TextIterator::CODE_POINT|TextIterator::REVERSE) as $k => $c) {
#    var_dump("$k: $c");
# }
# Any suggestions?
2006-02-07 20:01:28 +00:00
Andrei Zmievski f71a7cb1f4 Implement combining sequences support in TextIterator. 2006-02-07 00:13:54 +00:00
Andrei Zmievski 071835ea59 - Fix up a bunch of stuff.
- Register TextIterator type constants.

# Not sure if I like them as class constants. Cleaner, but also longer
# to type.
2006-02-06 22:58:10 +00:00
Andrei Zmievski 9e07b59f9c Some TODO items. 2006-02-06 18:18:41 +00:00
Andrei Zmievski 1e9fa8c10a Make TextIterator fast again, now that we don't have to worry about
references.
2006-02-06 17:42:28 +00:00
Marcus Boerger c67d8b2152 - Iterator API was changed 2006-02-05 23:31:47 +00:00
Andrei Zmievski 589d28e429 Implement Traversable instead of Iterator. 2006-02-04 00:41:42 +00:00
Andrei Zmievski fe5aac2f41 Add code unit ops. 2006-02-04 00:35:37 +00:00
Andrei Zmievski 4a3bf22b81 Abstract the iterator interface so that we can add new types. 2006-02-04 00:23:52 +00:00
Andrei Zmievski 94e3087be7 Gah. In order to avoid memory corruption when using references in
foreach() this code is necessary. But it makes iterator 6x slower. We
should keep thinking about how to optimize it.
2006-02-03 23:50:42 +00:00
Andrei Zmievski aa7ed0788c Guard against assign-by-ref. 2006-02-03 21:53:05 +00:00
Andrei Zmievski 682ec6e25e Rewrite to use C-level iterators for performance. Also, cache the string
in the iterator object for immutability.
2006-02-03 00:09:19 +00:00
Sebastian Bergmann f3ddda4229 Fix Andrei. 2006-02-02 06:01:27 +00:00
Andrei Zmievski d887f2238b Remove debug message. 2006-02-02 00:05:21 +00:00
Andrei Zmievski 2b763aa305 Check for intern->text before destroying it. 2006-02-01 23:53:53 +00:00
Andrei Zmievski d4c929764a Proof-of-concept for TextIterator. Much more work to be done here. 2006-02-01 23:50:50 +00:00