Differences From Artifact [a48f5dd585]:
- File
src/OFEnumerator.h
— part of check-in
[f0f38b0f42]
at
2021-04-07 20:52:00
on branch trunk
— Override -[objectEnumerator] in some classes
Classes using lightweight generics should also use them for the
enumerator to allow stronger typing. (user: js, size: 3677) [annotate] [blame] [check-ins using] [more...]
To Artifact [aa2de24ec1]:
- File src/OFEnumerator.h — part of check-in [ed3b07591c] at 2021-04-17 02:43:11 on branch new-naming-convention — Rename of_fast_enumeration_state_t (user: js, size: 3657) [annotate] [blame] [check-ins using] [more...]
︙ | ︙ | |||
42 43 44 45 46 47 48 | /* * This needs to be exactly like this because it's hard-coded in the compiler. * * We need this bad check to see if we already imported Cocoa, which defines * this as well. */ /** | | | | | 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 68 69 70 71 | /* * This needs to be exactly like this because it's hard-coded in the compiler. * * We need this bad check to see if we already imported Cocoa, which defines * this as well. */ /** * @struct OFFastEnumerationState OFEnumerator.h ObjFW/OFEnumerator.h * * @brief State information for fast enumerations. */ #define OFFastEnumerationState NSFastEnumerationState #ifndef NSINTEGER_DEFINED typedef struct { /** Arbitrary state information for the enumeration */ unsigned long state; /** Pointer to a C array of objects to return */ id __unsafe_unretained _Nullable *_Nullable itemsPtr; /** Arbitrary state information to detect mutations */ unsigned long *_Nullable mutationsPtr; /** Additional arbitrary state information */ unsigned long extra[5]; } OFFastEnumerationState; #endif /** * @protocol OFFastEnumeration OFEnumerator.h ObjFW/OFEnumerator.h * * @brief A protocol for fast enumeration. * |
︙ | ︙ | |||
79 80 81 82 83 84 85 | * * @param state Context information for the enumeration * @param objects A pointer to an array where to put the objects * @param count The number of objects that can be stored at objects * @return The number of objects returned in objects or 0 when the enumeration * finished. */ | | | 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 | * * @param state Context information for the enumeration * @param objects A pointer to an array where to put the objects * @param count The number of objects that can be stored at objects * @return The number of objects returned in objects or 0 when the enumeration * finished. */ - (int)countByEnumeratingWithState: (OFFastEnumerationState *)state objects: (id __unsafe_unretained _Nonnull *_Nonnull) objects count: (int)count; @end /** * @class OFEnumerator OFEnumerator.h ObjFW/OFEnumerator.h |
︙ | ︙ |