254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
|
objects = objects_.objects;
keys = keys_.objects;
} @catch (id e) {
[self release];
@throw e;
}
@try {
return [self initWithObjects: objects
forKeys: keys
count: count];
} @finally {
objc_autoreleasePoolPop(pool);
}
}
#ifdef __clang__
/* We intentionally don't call into super, so silence the warning. */
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunknown-pragmas"
# pragma clang diagnostic ignored "-Wobjc-designated-initializers"
|
<
|
|
<
<
|
|
>
|
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
|
objects = objects_.objects;
keys = keys_.objects;
} @catch (id e) {
[self release];
@throw e;
}
self = [self initWithObjects: objects forKeys: keys count: count];
objc_autoreleasePoolPop(pool);
return self;
}
#ifdef __clang__
/* We intentionally don't call into super, so silence the warning. */
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wunknown-pragmas"
# pragma clang diagnostic ignored "-Wobjc-designated-initializers"
|
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
|
}
- (instancetype)initWithKey: (id)firstKey arguments: (va_list)arguments
{
size_t count = 1;
id *objects = NULL, *keys = NULL;
va_list argumentsCopy;
va_copy(argumentsCopy, arguments);
while (va_arg(argumentsCopy, id) != nil)
count++;
@try {
size_t i = 0;
id key, object;
if (firstKey == nil || count % 2 != 0)
@throw [OFInvalidArgumentException exception];
count /= 2;
objects = OFAllocMemory(count, sizeof(id));
keys = OFAllocMemory(count, sizeof(id));
|
>
>
>
|
|
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
|
}
- (instancetype)initWithKey: (id)firstKey arguments: (va_list)arguments
{
size_t count = 1;
id *objects = NULL, *keys = NULL;
va_list argumentsCopy;
if (firstKey == nil)
return [self init];
va_copy(argumentsCopy, arguments);
while (va_arg(argumentsCopy, id) != nil)
count++;
@try {
size_t i = 0;
id key, object;
if (count % 2 != 0)
@throw [OFInvalidArgumentException exception];
count /= 2;
objects = OFAllocMemory(count, sizeof(id));
keys = OFAllocMemory(count, sizeof(id));
|