#1456: String iterator rewrite
-----------------------+----------------------------------------------------
Reporter: nwellnhof | Type: patch
Status: new | Priority: normal
Milestone: | Component: none
Version: 2.1.0 | Severity: medium
Keywords: | Lang:
Patch: | Platform:
-----------------------+----------------------------------------------------
Here is another version of my attempt to rewrite the string iterator API.
It does the following:
1. Remove the members str, get_and_advance, set_and_advance and
set_position from struct string_iterator_t, keeping only bytepos and
charpos.
2. Switch the internal string iterator API to the following new macros:
STRING_ITER_INIT(i, iter)
STRING_ITER_GET(i, str, iter, offset)
STRING_ITER_SKIP(i, str, iter, skip)
STRING_ITER_GET_AND_ADVANCE(i, str, iter)
STRING_ITER_SET_AND_ADVANCE(i, str, iter, c)
STRING_ITER_SET_POSITION(i, str, iter, pos)
3. Change the string iterator PMC to actually use string iterators.
4. Rewrite Parrot_str_split to use string iterators.
The patch is split in two parts. The first part makes the changes
described above but keeps the old API. The second part removes the old
API.
--
Ticket URL: <https://trac.parrot.org/parrot/ticket/1456>
Parrot <https://trac.parrot.org/parrot/>
Parrot Development
_______________________________________________
parrot-tickets mailing list
[email protected]
http://lists.parrot.org/mailman/listinfo/parrot-tickets