Differences From Artifact [469dcb5227]:
- File src/OFDictionary.m — part of check-in [2517f18272] at 2010-04-17 16:09:37 on branch trunk — Give the methods in OFNumber better names. (user: js, size: 14043) [annotate] [blame] [check-ins using]
To Artifact [0083ef4288]:
- File
src/OFDictionary.m
— part of check-in
[37db8f0fb3]
at
2010-04-17 22:27:17
on branch trunk
— New ivar naming convention.
ivars are now named like this: thisIsAnIVar. If an accessor exists for
the ivar, the ivar is named like the accessor. This is required for
@property to work. (user: js, size: 14033) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
680 681 682 683 684 685 686 | } @end /// \cond internal @implementation OFDictionaryEnumerator - initWithData: (struct of_dictionary_bucket**)data_ size: (uint32_t)size_ | | | | | | | | 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 | } @end /// \cond internal @implementation OFDictionaryEnumerator - initWithData: (struct of_dictionary_bucket**)data_ size: (uint32_t)size_ mutationsPointer: (unsigned long*)mutationsPtr_ { self = [super init]; data = data_; size = size_; mutations = *mutationsPtr_; mutationsPtr = mutationsPtr_; return self; } - (void)reset { if (mutationsPtr != NULL && *mutationsPtr != mutations) @throw [OFEnumerationMutationException newWithClass: isa]; pos = 0; } @end @implementation OFDictionaryObjectEnumerator - (id)nextObject { if (mutationsPtr != NULL && *mutationsPtr != mutations) @throw [OFEnumerationMutationException newWithClass: isa]; for (; pos < size && (data[pos] == NULL || data[pos] == DELETED); pos++); if (pos < size) return data[pos++]->object; else return nil; } @end @implementation OFDictionaryKeyEnumerator - (id)nextObject { if (mutationsPtr != NULL && *mutationsPtr != mutations) @throw [OFEnumerationMutationException newWithClass: isa]; for (; pos < size && (data[pos] == NULL || data[pos] == DELETED); pos++); if (pos < size) return data[pos++]->key; else return nil; } @end /// \endcond |