ObjFW  Diff

Differences From Artifact [63b8a9aaca]:

To Artifact [d718ec6322]:


189
190
191
192
193
194
195















196
197
198
199
200
201
202
	objc_autoreleasePoolPop(pool);
}

- copy
{
	return [[OFDictionary alloc] initWithDictionary: self];
}
















#ifdef OF_HAVE_BLOCKS
- (void)replaceObjectsUsingBlock: (of_dictionary_replace_block_t)block
{
	[self enumerateKeysAndObjectsUsingBlock: ^ (id key, id object,
	    bool *stop) {
		id new = block(key, object);







>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
	objc_autoreleasePoolPop(pool);
}

- copy
{
	return [[OFDictionary alloc] initWithDictionary: self];
}

- (void)addEntriesFromDictionary: (OFDictionary *)dictionary
{
	void *pool = objc_autoreleasePoolPush();
	OFEnumerator *keyEnumerator = [dictionary keyEnumerator];
	OFEnumerator *objectEnumerator = [dictionary objectEnumerator];
	id key, object;

	while ((key = [keyEnumerator nextObject]) != nil &&
	    (object = [objectEnumerator nextObject]) != nil)
		[self setObject: object
			 forKey: key];

	objc_autoreleasePoolPop(pool);
}

#ifdef OF_HAVE_BLOCKS
- (void)replaceObjectsUsingBlock: (of_dictionary_replace_block_t)block
{
	[self enumerateKeysAndObjectsUsingBlock: ^ (id key, id object,
	    bool *stop) {
		id new = block(key, object);