Differences From Artifact [d4a26c57c8]:
- File src/OFIterator.m — part of check-in [94ea6848a8] at 2009-05-24 18:04:09 on branch trunk — Always use #include "config.h" instead of #import "config.h". (user: js, size: 1107) [annotate] [blame] [check-ins using]
To Artifact [96f23ad28b]:
- File
src/OFIterator.m
— part of check-in
[24ecf55297]
at
2009-06-29 12:33:59
on branch trunk
— Changes to OFDictionary, OFIterator and OFList - see details.
OFDictionary:
* More optimized way to internally store the data.
* Faster resizing of dictionaries (no rehashing anymore).OFIterator:
* Return a key/object pair rather than first the key and then the
object.OFList:
* Support for list objects with a different size so you can have your
own list object structs. (user: js, size: 1350) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
28 29 30 31 32 33 34 | size = size_; last = NULL; return self; } | | > > > | | | > > | | > > | > > > | | > > | | < > | 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 | size = size_; last = NULL; return self; } - (of_iterator_pair_t)nextKeyObjectPair { of_iterator_pair_t next; for (;;) { if (last == NULL) { for (; pos < size && data[pos] == nil; pos++); if (pos == size) { next.key = nil; next.object = nil; return next; } last = (of_dictionary_list_object_t*) [data[pos++] first]; next.key = last->key; next.object = last->object; return next; } if ((last = last->next) != NULL) { next.key = last->key; next.object = last->object; return next; } } } - reset { pos = 0; last = NULL; |
︙ | ︙ |