Overview
Comment: | OFEnumerator: Remove -[reset]
It's not very useful and is a problem for the Foundation bridge, as |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA3-256: |
7214a2c7af1a211fe36fd1aef30b7128 |
User & Date: | js on 2019-06-19 00:45:05 |
Other Links: | manifest | tags |
Context
2019-06-19
| ||
00:54 | OFEnumerator: Conform to OFFastEnumeration check-in: f18b5db636 user: js tags: trunk | |
00:45 | OFEnumerator: Remove -[reset] check-in: 7214a2c7af user: js tags: trunk | |
00:36 | OFDictionary: Add default for fast enumeration check-in: eeec8af349 user: js tags: trunk | |
Changes
Modified src/OFArray.m from [297edbd879] to [b12c539371].
︙ | ︙ | |||
960 961 962 963 964 965 966 | exceptionWithObject: _array]; if (_position < _count) return [_array objectAtIndex: _position++]; return nil; } | < < < < < < < < < | 960 961 962 963 964 965 966 967 | exceptionWithObject: _array]; if (_position < _count) return [_array objectAtIndex: _position++]; return nil; } @end |
Modified src/OFDNSResolver.m from [a2fc2aa0b5] to [088c1eb5e1].
︙ | ︙ | |||
1586 1587 1588 1589 1590 1591 1592 | } } #endif - (void)of_reloadSystemConfig { /* | | | | 1586 1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 | } } #endif - (void)of_reloadSystemConfig { /* * TODO: Rather than reparsing every time, check what actually changed * (mtime) and only reset those. */ if (_lastConfigReload != nil && _configReloadInterval > 0 && _lastConfigReload.timeIntervalSinceNow < _configReloadInterval) return; [_staticHosts release]; |
︙ | ︙ |
Modified src/OFEnumerator.h from [3064d9daa6] to [fb1ecf6b18].
︙ | ︙ | |||
55 56 57 58 59 60 61 | /*! * @brief Returns an array of all remaining objects in the collection. * * @return An array of all remaining objects in the collection. */ - (OFArray OF_GENERIC(ObjectType) *)allObjects; | < < < < < < | 55 56 57 58 59 60 61 62 63 64 65 66 67 68 | /*! * @brief Returns an array of all remaining objects in the collection. * * @return An array of all remaining objects in the collection. */ - (OFArray OF_GENERIC(ObjectType) *)allObjects; #if !defined(OF_HAVE_GENERICS) && !defined(DOXYGEN) # undef ObjectType #endif @end /* * This needs to be exactly like this because it's hard-coded in the compiler. |
︙ | ︙ |
Modified src/OFEnumerator.m from [71eb73c7cb] to [cc0c7b76c2].
︙ | ︙ | |||
54 55 56 57 58 59 60 | [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; } | < < < < < | 54 55 56 57 58 59 60 61 | [ret makeImmutable]; objc_autoreleasePoolPop(pool); return ret; } @end |
Modified src/OFList.m from [b8390d9c24] to [146f486f61].
︙ | ︙ | |||
441 442 443 444 445 446 447 | return nil; ret = _current->object; _current = _current->next; return ret; } | < < < < < < < < < | 441 442 443 444 445 446 447 448 | return nil; ret = _current->object; _current = _current->next; return ret; } @end |
Modified src/OFMapTable.h from [094ec6866a] to [1f1f29d31e].
︙ | ︙ | |||
251 252 253 254 255 256 257 | /*! * @brief Returns a pointer to the next object, or NULL if the enumeration * finished. * * @return The next object */ - (void *_Nullable *_Nullable)nextObject; | < < < < < < | 251 252 253 254 255 256 257 258 259 260 | /*! * @brief Returns a pointer to the next object, or NULL if the enumeration * finished. * * @return The next object */ - (void *_Nullable *_Nullable)nextObject; @end OF_ASSUME_NONNULL_END |
Modified src/OFMapTable.m from [916c94f96d] to [889ef07313].
︙ | ︙ | |||
677 678 679 680 681 682 683 | [super dealloc]; } - (void **)nextObject { OF_UNRECOGNIZED_SELECTOR } | < < < < < < < < < | 677 678 679 680 681 682 683 684 685 686 687 688 689 690 | [super dealloc]; } - (void **)nextObject { OF_UNRECOGNIZED_SELECTOR } @end @implementation OFMapTableKeyEnumerator - (void **)nextObject { if (*_mutationsPtr != _mutations) @throw [OFEnumerationMutationException |
︙ | ︙ | |||
758 759 760 761 762 763 764 | } @catch (OFEnumerationMutationException *e) { @throw [OFEnumerationMutationException exceptionWithObject: _object]; } return (id)*objectPtr; } | < < < < < < < < < < | 749 750 751 752 753 754 755 756 | } @catch (OFEnumerationMutationException *e) { @throw [OFEnumerationMutationException exceptionWithObject: _object]; } return (id)*objectPtr; } @end |
Modified tests/OFArrayTests.m from [e635773d52] to [501a7abef0].
︙ | ︙ | |||
290 291 292 293 294 295 296 | } if (m[0].count != i) ok = false; TEST(@"OFEnumerator's -[nextObject]", ok) | < | 290 291 292 293 294 295 296 297 298 299 300 301 302 303 | } if (m[0].count != i) ok = false; TEST(@"OFEnumerator's -[nextObject]", ok) [m[0] removeObjectAtIndex: 0]; EXPECT_EXCEPTION(@"Detection of mutation during enumeration", OFEnumerationMutationException, [enumerator nextObject]) m[0] = [[a[0] mutableCopy] autorelease]; ok = true; |
︙ | ︙ |
Modified tests/OFDictionaryTests.m from [c3a18a2f55] to [71910a92f2].
︙ | ︙ | |||
218 219 220 221 222 223 224 | [[keyEnumerator nextObject] isEqual: keys[0]] && [[objectEnumerator nextObject] isEqual: values[0]] && [[keyEnumerator nextObject] isEqual: keys[1]] && [[objectEnumerator nextObject] isEqual: values[1]] && [keyEnumerator nextObject] == nil && [objectEnumerator nextObject] == nil) | < | 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | [[keyEnumerator nextObject] isEqual: keys[0]] && [[objectEnumerator nextObject] isEqual: values[0]] && [[keyEnumerator nextObject] isEqual: keys[1]] && [[objectEnumerator nextObject] isEqual: values[1]] && [keyEnumerator nextObject] == nil && [objectEnumerator nextObject] == nil) [mutDict removeObjectForKey: keys[0]]; EXPECT_EXCEPTION(@"Detection of mutation during enumeration", OFEnumerationMutationException, [keyEnumerator nextObject]); [mutDict setObject: values[0] forKey: keys[0]]; |
︙ | ︙ |
Modified tests/OFListTests.m from [c2851ea215] to [0f5664c086].
︙ | ︙ | |||
105 106 107 108 109 110 111 | } if (list.count != i) ok = false; TEST(@"OFEnumerator's -[nextObject]", ok); | < | 105 106 107 108 109 110 111 112 113 114 115 116 117 118 | } if (list.count != i) ok = false; TEST(@"OFEnumerator's -[nextObject]", ok); [list removeListObject: list.firstListObject]; EXPECT_EXCEPTION(@"Detection of mutation during enumeration", OFEnumerationMutationException, [enumerator nextObject]) [list prependObject: strings[0]]; |
︙ | ︙ |