ObjFW  Diff

Differences From Artifact [d5e78125eb]:

To Artifact [3ab2b8abce]:


108
109
110
111
112
113
114












115
116
117
118
119
120
121
122
123
124
125
126
127
128
129












130
131
132
133
134
135
136
	size_t i, count = [array count];

	for (i = 0; i < count; i++) {
		if ([objs[i] isEqual: obj]) {
			OFObject *obj = objs[i];
			[array removeItemAtIndex: i];
			[obj release];












		}
	}

	return self;
}

- removeObjectIdenticalTo: (OFObject*)obj
{
	OFObject **objs = [array cArray];
	size_t i, count = [array count];

	for (i = 0; i < count; i++) {
		if (objs[i] == obj) {
			[array removeItemAtIndex: i];
			[obj release];












		}
	}

	return self;
}

- removeObjectAtIndex: (size_t)index







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















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







108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
	size_t i, count = [array count];

	for (i = 0; i < count; i++) {
		if ([objs[i] isEqual: obj]) {
			OFObject *obj = objs[i];
			[array removeItemAtIndex: i];
			[obj release];

			/*
			 * We need to get the C array again as it might have
			 * been relocated. We also need to adjust the count
			 * as otherwise we would have an out of bounds access.
			 * As another object will be at the current index now,
			 * we also need to handle the same index again, thus we
			 * decrease it.
			 */
			objs = [array cArray];
			count--;
			i--;
		}
	}

	return self;
}

- removeObjectIdenticalTo: (OFObject*)obj
{
	OFObject **objs = [array cArray];
	size_t i, count = [array count];

	for (i = 0; i < count; i++) {
		if (objs[i] == obj) {
			[array removeItemAtIndex: i];
			[obj release];

			/*
			 * We need to get the C array again as it might have
			 * been relocated. We also need to adjust the count
			 * as otherwise we would have an out of bounds access.
			 * As another object will be at the current index now,
			 * we also need to handle the same index again, thus we
			 * decrease it.
			 */
			objs = [array cArray];
			count--;
			i--;
		}
	}

	return self;
}

- removeObjectAtIndex: (size_t)index