Differences From 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]
To Artifact [7c8346b7b5]:
- File src/OFIterator.m — part of check-in [eddc0ba58c] at 2009-06-30 13:38:36 on branch trunk — Implement OFCopying and OFMutableCopying in OFDictionary. (user: js, size: 1423) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
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 | 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 { | > > > | 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 | for (;;) { if (last == NULL) { for (; pos < size && data[pos] == nil; pos++); if (pos == size) { next.key = nil; next.object = nil; next.hash = 0; return next; } last = (of_dictionary_list_object_t*) [data[pos++] first]; next.key = last->key; next.object = last->object; next.hash = last->hash; return next; } if ((last = last->next) != NULL) { next.key = last->key; next.object = last->object; next.hash = last->hash; return next; } } } - reset { |
︙ | ︙ |