Index: src/Makefile ================================================================== --- src/Makefile +++ src/Makefile @@ -29,11 +29,10 @@ OFXMLElement.m \ OFXMLParser.m \ unicode.m INCLUDES := ${SRCS:.m=.h} \ - OFFastEnumeration.h \ OFMacros.h \ ObjFW.h \ asprintf.h \ ${ATOMIC_H} \ objfw-defs.h \ Index: src/OFArray.h ================================================================== --- src/OFArray.h +++ src/OFArray.h @@ -11,11 +11,10 @@ #include #import "OFObject.h" #import "OFEnumerator.h" -#import "OFFastEnumeration.h" @class OFDataArray; @class OFString; /** Index: src/OFDictionary.h ================================================================== --- src/OFDictionary.h +++ src/OFDictionary.h @@ -11,11 +11,10 @@ #include #import "OFObject.h" #import "OFEnumerator.h" -#import "OFFastEnumeration.h" @class OFArray; struct of_dictionary_bucket { Index: src/OFEnumerator.h ================================================================== --- src/OFEnumerator.h +++ src/OFEnumerator.h @@ -24,5 +24,31 @@ * Resets the enumerator, so the next call to nextObject returns the first * object again. */ - reset; @end + +/* + * This needs to be exactly like this because it's hardcoded in the compiler. + * + * We need this bad check to see if we already imported Cocoa, which defines + * this as well. + */ +#define of_fast_enumeration_state_t NSFastEnumerationState +#ifndef NSINTEGER_DEFINED +typedef struct __of_fast_enumeration_state { + unsigned long state; + id *itemsPtr; + unsigned long *mutationsPtr; + unsigned long extra[5]; +} of_fast_enumeration_state_t; +#endif + +/** + * The OFFastEnumeration protocol needs to be implemented by all classes + * supporting fast enumeration. + */ +@protocol OFFastEnumeration +- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state + objects: (id*)objects + count: (int)count; +@end DELETED src/OFFastEnumeration.h Index: src/OFFastEnumeration.h ================================================================== --- src/OFFastEnumeration.h +++ src/OFFastEnumeration.h @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2008 - 2009 - * Jonathan Schleifer - * - * All rights reserved. - * - * This file is part of ObjFW. It may be distributed under the terms of the - * Q Public License 1.0, which can be found in the file LICENSE included in - * the packaging of this file. - */ - -#import "OFObject.h" - -/* - * This needs to be exactly like this because it's hardcoded in the compiler. - * - * We need this bad check to see if we already imported Cocoa, which defines - * this as well. - */ -#define of_fast_enumeration_state_t NSFastEnumerationState -#ifndef NSINTEGER_DEFINED -typedef struct __of_fast_enumeration_state { - unsigned long state; - id *itemsPtr; - unsigned long *mutationsPtr; - unsigned long extra[5]; -} of_fast_enumeration_state_t; -#endif - -/** - * The OFFastEnumeration protocol needs to be implemented by all classes - * supporting fast enumeration. - */ -@protocol OFFastEnumeration -- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state - objects: (id*)objects - count: (int)count; -@end