ObjFW  Diff

Differences From Artifact [39a49b7b3f]:

To Artifact [75abc74933]:


10
11
12
13
14
15
16


17
18
19
20
21
22
23
 */

#include "config.h"

#include "assert.h"

#import "OFList.h"


#import "OFExceptions.h"
#import "macros.h"

@implementation OFList
+ list
{
	return [[[self alloc] init] autorelease];







>
>







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 */

#include "config.h"

#include "assert.h"

#import "OFList.h"
#import "OFString.h"
#import "OFAutoreleasePool.h"
#import "OFExceptions.h"
#import "macros.h"

@implementation OFList
+ list
{
	return [[[self alloc] init] autorelease];
252
253
254
255
256
257
258
























259
260
261
262
263
264
265
		OF_HASH_ADD(hash, h & 0xFF);
	}

	OF_HASH_FINALIZE(hash);

	return hash;
}

























- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state
			   objects: (id*)objects
			     count: (int)count_
{
	of_list_object_t **list_obj = (of_list_object_t**)state->extra;








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







254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
		OF_HASH_ADD(hash, h & 0xFF);
	}

	OF_HASH_FINALIZE(hash);

	return hash;
}

- (OFString*)description
{
	OFMutableString *ret = [OFMutableString stringWithString: @"["];
	OFAutoreleasePool *pool;
	of_list_object_t *iter;

	pool = [[OFAutoreleasePool alloc] init];

	for (iter = firstListObject; iter != NULL; iter = iter->next) {
		[ret appendString: [iter->object description]];

		if (iter->next != NULL)
			[ret appendString: @", "];

		[pool releaseObjects];
	}

	[ret appendString: @"]"];

	[pool release];

	return ret;
}

- (int)countByEnumeratingWithState: (of_fast_enumeration_state_t*)state
			   objects: (id*)objects
			     count: (int)count_
{
	of_list_object_t **list_obj = (of_list_object_t**)state->extra;