ObjFW  Check-in [66302f7848]

Overview
Comment:Fix double-retain in OFList.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | 0.5
Files: files | file ages | folders
SHA3-256: 66302f7848677e661986ea66e3519e10718f85987d8d227e108467528bee2490
User & Date: js on 2011-04-22 18:22:11
Other Links: branch diff | manifest | tags
Context
2011-04-22
20:43
OFStreamObserver: Don't ignore the timeout when using select(). check-in: e7bb41764c user: js tags: 0.5
18:22
Fix double-retain in OFList. check-in: 66302f7848 user: js tags: 0.5
2011-04-21
11:21
Update ChangeLog. check-in: 24c4b1a4fd user: js tags: 0.5, 0.5.1-release
Changes

Modified src/OFList.m from [ca60541ce0] to [80de30a57f].

77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
	lastListObject = o;
	if (firstListObject == NULL)
		firstListObject = o;

	count++;
	mutations++;

	[obj retain];

	return o;
}

- (of_list_object_t*)prependObject: (id)obj
{
	of_list_object_t *o;








<
<







77
78
79
80
81
82
83


84
85
86
87
88
89
90
	lastListObject = o;
	if (firstListObject == NULL)
		firstListObject = o;

	count++;
	mutations++;



	return o;
}

- (of_list_object_t*)prependObject: (id)obj
{
	of_list_object_t *o;

101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
	firstListObject = o;
	if (lastListObject == NULL)
		lastListObject = o;

	count++;
	mutations++;

	[obj retain];

	return o;
}

- (of_list_object_t*)insertObject: (id)obj
		 beforeListObject: (of_list_object_t*)listobj
{
	of_list_object_t *o;







<
<







99
100
101
102
103
104
105


106
107
108
109
110
111
112
	firstListObject = o;
	if (lastListObject == NULL)
		lastListObject = o;

	count++;
	mutations++;



	return o;
}

- (of_list_object_t*)insertObject: (id)obj
		 beforeListObject: (of_list_object_t*)listobj
{
	of_list_object_t *o;
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142

	if (listobj == firstListObject)
		firstListObject = o;

	count++;
	mutations++;

	[obj retain];

	return o;
}

- (of_list_object_t*)insertObject: (id)obj
		  afterListObject: (of_list_object_t*)listobj
{
	of_list_object_t *o;







<
<







123
124
125
126
127
128
129


130
131
132
133
134
135
136

	if (listobj == firstListObject)
		firstListObject = o;

	count++;
	mutations++;



	return o;
}

- (of_list_object_t*)insertObject: (id)obj
		  afterListObject: (of_list_object_t*)listobj
{
	of_list_object_t *o;
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168

	if (listobj == lastListObject)
		lastListObject = o;

	count++;
	mutations++;

	[obj retain];

	return o;
}

- (void)removeListObject: (of_list_object_t*)listobj
{
	if (listobj->prev != NULL)
		listobj->prev->next = listobj->next;







<
<







147
148
149
150
151
152
153


154
155
156
157
158
159
160

	if (listobj == lastListObject)
		lastListObject = o;

	count++;
	mutations++;



	return o;
}

- (void)removeListObject: (of_list_object_t*)listobj
{
	if (listobj->prev != NULL)
		listobj->prev->next = listobj->next;
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
			if (new->firstListObject == NULL)
				new->firstListObject = o;
			if (prev != NULL)
				prev->next = o;

			new->count++;

			[o->object retain];

			prev = o;
		}
	} @catch (id e) {
		[new release];
		@throw e;
	}








<
<







247
248
249
250
251
252
253


254
255
256
257
258
259
260
			if (new->firstListObject == NULL)
				new->firstListObject = o;
			if (prev != NULL)
				prev->next = o;

			new->count++;



			prev = o;
		}
	} @catch (id e) {
		[new release];
		@throw e;
	}