ObjFW  Diff

Differences From Artifact [b126234b89]:

To Artifact [1675014936]:


13
14
15
16
17
18
19
20
21
22
23

24
25
26
27
28
29
30
 * file.
 */

#include "config.h"

#include <stdlib.h>

#include <assert.h>

#import "OFMutableSet.h"
#import "OFMutableMapTableSet.h"


static struct {
	Class isa;
} placeholder;

@interface OFMutableSetPlaceholder: OFMutableSet
@end







<
<


>







13
14
15
16
17
18
19


20
21
22
23
24
25
26
27
28
29
 * file.
 */

#include "config.h"

#include <stdlib.h>



#import "OFMutableSet.h"
#import "OFMutableMapTableSet.h"
#import "OFString.h"

static struct {
	Class isa;
} placeholder;

@interface OFMutableSetPlaceholder: OFMutableSet
@end
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184

	cArray = OFAllocMemory(count, sizeof(id));
	@try {
		size_t i;

		i = 0;
		for (id object in self) {
			assert(i < count);
			cArray[i++] = object;
		}

		for (i = 0; i < count; i++)
			if (![set containsObject: cArray[i]])
				[self removeObject: cArray[i]];
	} @finally {







|







169
170
171
172
173
174
175
176
177
178
179
180
181
182
183

	cArray = OFAllocMemory(count, sizeof(id));
	@try {
		size_t i;

		i = 0;
		for (id object in self) {
			OFAssert(i < count);
			cArray[i++] = object;
		}

		for (i = 0; i < count; i++)
			if (![set containsObject: cArray[i]])
				[self removeObject: cArray[i]];
	} @finally {