Index: src/OFObject.h ================================================================== --- src/OFObject.h +++ src/OFObject.h @@ -574,10 +574,20 @@ * * @return Whether the method has been added to the class */ + (bool)resolveInstanceMethod: (SEL)selector; +/*! + * @brief Returns the class. + * + * This method exists so that classes can be used in collections requiring + * conformance to the OFCopying protocol. + * + * @return The class of the object + */ ++ copy; + /*! * @brief Initializes an already allocated object. * * Derived classes may override this, but need to do * @code Index: src/OFObject.m ================================================================== --- src/OFObject.m +++ src/OFObject.m @@ -1157,17 +1157,16 @@ { [self doesNotRecognizeSelector: _cmd]; abort(); } -+ copyWithZone: (void*)zone ++ copy { - [self doesNotRecognizeSelector: _cmd]; - abort(); + return self; } + mutableCopyWithZone: (void*)zone { [self doesNotRecognizeSelector: _cmd]; abort(); } @end