ObjFW  Diff

Differences From Artifact [d8234d4e2f]:

To Artifact [61aefc4e65]:


96
97
98
99
100
101
102
103

104
105
106
107
108
109
110
111
96
97
98
99
100
101
102

103

104
105
106
107
108
109
110







-
+
-







		@throw e;
	}

	self = [self initWithCapacity: count];

	@try {
		for (id object in set)
			[_mapTable setObject: (void *)1
			[_mapTable setObject: (void *)1 forKey: object];
				      forKey: object];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}
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
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







-
+
-















-
+
-







		@throw e;
	}

	self = [self initWithCapacity: count];

	@try {
		for (id object in array)
			[_mapTable setObject: (void *)1
			[_mapTable setObject: (void *)1 forKey: object];
				      forKey: object];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}

- (instancetype)initWithObjects: (id const *)objects
			  count: (size_t)count
{
	self = [self initWithCapacity: count];

	@try {
		for (size_t i = 0; i < count; i++)
			[_mapTable setObject: (void *)1
			[_mapTable setObject: (void *)1 forKey: objects[i]];
				      forKey: objects[i]];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}
170
171
172
173
174
175
176
177

178
179
180
181

182
183
184
185
186
187
188
189
167
168
169
170
171
172
173

174

175
176

177

178
179
180
181
182
183
184







-
+
-


-
+
-







		for (count = 1; va_arg(argumentsCopy, id) != nil; count++);

		_mapTable = [[OFMapTable alloc]
		    initWithKeyFunctions: keyFunctions
			 objectFunctions: objectFunctions
				capacity: count];

		[_mapTable setObject: (void *)1
		[_mapTable setObject: (void *)1 forKey: firstObject];
			      forKey: firstObject];

		while ((object = va_arg(arguments, id)) != nil)
			[_mapTable setObject: (void *)1
			[_mapTable setObject: (void *)1 forKey: object];
				      forKey: object];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}