diff options
| author | Alex Dowad <alexinbeijing@gmail.com> | 2020-04-23 10:45:20 +0200 |
|---|---|---|
| committer | Nikita Popov <nikita.ppv@gmail.com> | 2020-05-12 17:22:31 +0200 |
| commit | d4d0852c2363fae2c7f979169ed8621379411a2c (patch) | |
| tree | af6b5aae03f1e7048a1f3cb7d064ef5b696dff4f /win32/codepage.c | |
| parent | 9999e7faa3f7fc9eb7f654b703faab9b18328229 (diff) | |
| download | php-git-d4d0852c2363fae2c7f979169ed8621379411a2c.tar.gz | |
SplDoublyLinkedList uses iteration flags in iterator struct
The 'flags' field in spl_dllist_it was formerly unused. This means that if one started to
iterate over an SplDoublyLinkedList using 'foreach', and then *changed* the iteration mode
halfway, the 'foreach' loop would start iterating in the opposite direction. Probably this
was not what was intended.
Therefore, use the 'flags' field in spl_dllist_it for iteration via 'foreach'. For explicit
iteration using methods like '::next()' and '::current()', continue to use the flags in
the SplDoublyLinkedList object itself.
Diffstat (limited to 'win32/codepage.c')
0 files changed, 0 insertions, 0 deletions
