ObjFW  Check-in [526feacebc]

Overview
Comment:Small optimization for -[isEqual:]
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 526feacebcb33315564a04d34f1b948a23fcdd4e047e84148b70e9dd62fb9181
User & Date: js on 2017-11-11 23:27:09
Other Links: manifest | tags
Context
2017-11-12
18:27
OFFileManager: Major API redesign check-in: 34fe205b84 user: js tags: trunk
2017-11-11
23:27
Small optimization for -[isEqual:] check-in: 526feacebc user: js tags: trunk
22:28
Make the default OFFileManager a singleton check-in: 9a60a5adfc user: js tags: trunk
Changes

Modified src/OFArray.m from [d01c44316b] to [645bd4495c].

506
507
508
509
510
511
512



513
514
515
516
517
518
519
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522







+
+
+







}

- (bool)isEqual: (id)object
{
	/* FIXME: Optimize (for example, buffer of 16 for each) */
	OFArray *otherArray;
	size_t count;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFArray class]])
		return false;

	otherArray = object;

	count = [self count];

Modified src/OFArray_adjacent.m from [2b59628bd4] to [6dbe5f8af8].

278
279
280
281
282
283
284



285
286
287
288
289
290
291
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294







+
+
+







}

- (bool)isEqual: (id)object
{
	OFArray *otherArray;
	id const *objects, *otherObjects;
	size_t count;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFArray_adjacent class]] &&
	    ![object isKindOfClass: [OFMutableArray_adjacent class]])
		return [super isEqual: object];

	otherArray = object;

Modified src/OFArray_adjacentSubarray.m from [d63ca8de44] to [20b791246d].

26
27
28
29
30
31
32



33
34
35
36
37
38
39
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42







+
+
+







	return [_array objects] + _range.location;
}

- (bool)isEqual: (id)object
{
	OFArray *otherArray;
	id const *objects, *otherObjects;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFArray_adjacent class]] &&
	    ![object isKindOfClass: [OFMutableArray_adjacent class]])
		return [super isEqual: object];

	otherArray = object;

Modified src/OFData.m from [878145eec0] to [78d0532385].

414
415
416
417
418
419
420



421
422
423
424
425
426
427
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430







+
+
+







					   itemSize: _itemSize
					      count: _count];
}

- (bool)isEqual: (id)object
{
	OFData *data;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFData class]])
		return false;

	data = object;

	if ([data count] != _count || [data itemSize] != _itemSize)

Modified src/OFDate.m from [f5a435fe1e] to [ed9a79856e].

353
354
355
356
357
358
359



360
361
362
363
364
365
366
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369







+
+
+








	return self;
}

- (bool)isEqual: (id)object
{
	OFDate *otherDate;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFDate class]])
		return false;

	otherDate = object;

	if (otherDate->_seconds != _seconds)

Modified src/OFDictionary.m from [6b71ce3a87] to [5436e85cb7].

404
405
406
407
408
409
410



411
412
413
414
415
416
417
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420







+
+
+








- (bool)isEqual: (id)object
{
	OFDictionary *otherDictionary;
	void *pool;
	OFEnumerator *keyEnumerator, *objectEnumerator;
	id key;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFDictionary class]])
		return false;

	otherDictionary = object;

	if ([otherDictionary count] != [self count])

Modified src/OFDictionary_hashtable.m from [4b2eb176eb] to [03c2ec717a].

306
307
308
309
310
311
312
313

314
315

316



317
318
319



320
321

322
323

324
325
326
327
328
329
330
306
307
308
309
310
311
312

313
314

315
316
317
318
319



320
321
322
323

324
325

326
327
328
329
330
331
332
333







-
+

-
+

+
+
+
-
-
-
+
+
+

-
+

-
+







}

- (size_t)count
{
	return [_mapTable count];
}

- (bool)isEqual: (id)dictionary
- (bool)isEqual: (id)object
{
	OFDictionary_hashtable *dictionary_;
	OFDictionary_hashtable *dictionary;

	if (object == self)
		return true;

	if (![dictionary isKindOfClass: [OFDictionary_hashtable class]] &&
	    ![dictionary isKindOfClass: [OFMutableDictionary_hashtable class]])
		return [super isEqual: dictionary];
	if (![object isKindOfClass: [OFDictionary_hashtable class]] &&
	    ![object isKindOfClass: [OFMutableDictionary_hashtable class]])
		return [super isEqual: object];

	dictionary_ = (OFDictionary_hashtable *)dictionary;
	dictionary = (OFDictionary_hashtable *)object;

	return [dictionary_->_mapTable isEqual: _mapTable];
	return [dictionary->_mapTable isEqual: _mapTable];
}

- (bool)containsObject: (id)object
{
	return [_mapTable containsObject: object];
}

Modified src/OFHTTPCookie.m from [e5c1061662] to [8f0722daec].

324
325
326
327
328
329
330
331

332
333

334



335

336
337
338

339
340

341
342

343
344

345
346

347

348

349
350

351
352

353
354
355


356
357
358
359
360
361
362
324
325
326
327
328
329
330

331
332

333
334
335
336
337

338
339
340

341
342

343
344

345
346

347
348

349
350
351

352
353

354
355

356
357


358
359
360
361
362
363
364
365
366







-
+

-
+

+
+
+
-
+


-
+

-
+

-
+

-
+

-
+

+
-
+

-
+

-
+

-
-
+
+







	[_path release];
	[_expires release];
	[_extensions release];

	[super dealloc];
}

- (bool)isEqual: (id)otherObject
- (bool)isEqual: (id)object
{
	OFHTTPCookie *other;
	OFHTTPCookie *cookie;

	if (object == self)
		return true;

	if (![otherObject isKindOfClass: [OFHTTPCookie class]])
	if (![object isKindOfClass: [OFHTTPCookie class]])
		return false;

	other = otherObject;
	cookie = object;

	if (![_name isEqual: other->_name])
	if (![cookie->_name isEqual: _name])
		return false;
	if (![_value isEqual: other->_value])
	if (![cookie->_value isEqual: _value])
		return false;
	if (_domain != other->_domain && ![_domain isEqual: other->_domain])
	if (cookie->_domain != _domain && ![cookie->_domain isEqual: _domain])
		return false;
	if (_path != other->_path && ![_path isEqual: other->_path])
	if (cookie->_path != _path && ![cookie->_path isEqual: _path])
		return false;
	if (cookie->_expires != _expires &&
	if (_expires != other->_expires && ![_expires isEqual: other->_expires])
	    ![cookie->_expires isEqual: _expires])
		return false;
	if (_secure != other->_secure)
	if (cookie->_secure != _secure)
		return false;
	if (_HTTPOnly != other->_HTTPOnly)
	if (cookie->_HTTPOnly != _HTTPOnly)
		return false;
	if (_extensions != other->_extensions &&
	    ![_extensions isEqual: other->_extensions])
	if (cookie->_extensions != _extensions &&
	    ![cookie->_extensions isEqual: _extensions])
		return false;

	return true;
}

- (uint32_t)hash
{

Modified src/OFHTTPRequest.m from [33eb5fdd58] to [88ac73f99a].

144
145
146
147
148
149
150



151
152
153
154
155
156
157
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160







+
+
+








	return copy;
}

- (bool)isEqual: (id)object
{
	OFHTTPRequest *request;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFHTTPRequest class]])
		return false;

	request = object;

	if (request->_method != _method ||

Modified src/OFIntrospection.m from [045afb68a1] to [68d6f8235a].

82
83
84
85
86
87
88



89
90
91
92
93
94
95
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98







+
+
+







	return [OFString stringWithFormat: @"<%@: %@ [%s]>",
					   [self class], _name, _typeEncoding];
}

- (bool)isEqual: (id)object
{
	OFMethod *method;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFMethod class]])
		return false;

	method = object;

	if (!sel_isEqual(method->_selector, _selector))
317
318
319
320
321
322
323



324
325
326
327
328
329
330
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336







+
+
+







			      [self class], _name, _attributes,
			      _getter, _setter];
}

- (bool)isEqual: (id)object
{
	OFProperty *otherProperty;

	if (object == self)
		return true;

	if ([object isKindOfClass: [OFProperty class]])
		return false;

	otherProperty = object;

	if (![otherProperty->_name isEqual: _name])

Modified src/OFList.m from [8973979249] to [5fdedf938a].

201
202
203
204
205
206
207



208
209
210
211
212
213
214
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217







+
+
+







	return _count;
}

- (bool)isEqual: (id)object
{
	OFList *list;
	of_list_object_t *iter, *iter2;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFList class]])
		return false;

	list = object;

	if ([list count] != _count)

Modified src/OFMapTable.m from [18b269539e] to [1089d5714e].

192
193
194
195
196
197
198



199
200
201
202
203
204
205
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208







+
+
+








	[super dealloc];
}

- (bool)isEqual: (id)object
{
	OFMapTable *mapTable;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFMapTable class]])
		return false;

	mapTable = object;

	if (mapTable->_count != _count ||

Modified src/OFMessagePackExtension.m from [67186a8de4] to [159f7d26e5].

157
158
159
160
161
162
163



164
165
166
167
168
169
170
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173







+
+
+







	return [OFString stringWithFormat: @"<OFMessagePackExtension: %d, %@>",
					   _type, _data];
}

- (bool)isEqual: (id)object
{
	OFMessagePackExtension *extension;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFMessagePackExtension class]])
		return false;

	extension = object;

	if (extension->_type != _type || ![extension->_data isEqual: _data])

Modified src/OFNumber.m from [c650f7deea] to [12ab796c0f].

730
731
732
733
734
735
736



737
738
739
740
741
742
743
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746







+
+
+







{
	RETURN_AS(double)
}

- (bool)isEqual: (id)object
{
	OFNumber *number;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFNumber class]])
		return false;

	number = object;

	if (_type & OF_NUMBER_TYPE_FLOAT ||

Modified src/OFObject.m from [fdaee34133] to [e04ae60642].

990
991
992
993
994
995
996
997

998
999
1000
1001
1002
1003
1004
990
991
992
993
994
995
996

997
998
999
1000
1001
1002
1003
1004







-
+







		return nil;

	return [OFMethodSignature signatureWithObjCTypes: typeEncoding];
}

- (bool)isEqual: (id)object
{
	return (self == object);
	return (object == self);
}

- (uint32_t)hash
{
	uintptr_t ptr = (uintptr_t)self;
	uint32_t hash;

Modified src/OFPair.m from [e5cb38f069] to [f2d44708a8].

60
61
62
63
64
65
66



67
68
69
70
71
72
73
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76







+
+
+







{
	return _secondObject;
}

- (bool)isEqual: (id)object
{
	OFPair *pair;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFPair class]])
		return false;

	pair = object;

	if (pair->_firstObject != _firstObject &&

Modified src/OFSandbox.m from [aa77760050] to [7c29c72b15].

338
339
340
341
342
343
344
345

346
347

348



349

350
351
352

353
354

355
356

357
358

359
360

361
362

363
364
365

366
367

368
369

370
371

372
373
374

375
376

377
378

379
380

381
382

383
384
385

386
387
388

389
390
391

392
393

394
395

396
397

398
399

400
401

402
403

404
405

406
407

408
409
410

411
412

413
414

415
416
417
418
419
420
421
338
339
340
341
342
343
344

345
346

347
348
349
350
351

352
353
354

355
356

357
358

359
360

361
362

363
364

365

366

367
368

369
370

371
372

373
374
375

376
377

378
379

380
381

382
383

384

385

386
387
388

389
390
391

392
393

394
395

396
397

398
399

400
401

402
403

404
405

406
407

408
409
410

411
412

413
414

415
416
417
418
419
420
421
422







-
+

-
+

+
+
+
-
+


-
+

-
+

-
+

-
+

-
+

-
+
-

-
+

-
+

-
+

-
+


-
+

-
+

-
+

-
+

-
+
-

-
+


-
+


-
+

-
+

-
+

-
+

-
+

-
+

-
+

-
+

-
+


-
+

-
+

-
+







	copy->_allowsPF = _allowsPF;
	copy->_allowsAudio = _allowsAudio;
	copy->_allowsBPF = _allowsBPF;

	return copy;
}

- (bool)isEqual: (id)otherObject
- (bool)isEqual: (id)object
{
	OFSandbox *otherSandbox;
	OFSandbox *sandbox;

	if (object == self)
		return true;

	if (![otherObject isKindOfClass: [OFSandbox class]])
	if (![object isKindOfClass: [OFSandbox class]])
		return false;

	otherSandbox = otherObject;
	sandbox = object;

	if (otherSandbox->_allowsStdIO != _allowsStdIO)
	if (sandbox->_allowsStdIO != _allowsStdIO)
		return false;
	if (otherSandbox->_allowsReadingFiles != _allowsReadingFiles)
	if (sandbox->_allowsReadingFiles != _allowsReadingFiles)
		return false;
	if (otherSandbox->_allowsWritingFiles != _allowsWritingFiles)
	if (sandbox->_allowsWritingFiles != _allowsWritingFiles)
		return false;
	if (otherSandbox->_allowsCreatingFiles != _allowsCreatingFiles)
	if (sandbox->_allowsCreatingFiles != _allowsCreatingFiles)
		return false;
	if (otherSandbox->_allowsCreatingSpecialFiles !=
	if (sandbox->_allowsCreatingSpecialFiles != _allowsCreatingSpecialFiles)
	    _allowsCreatingSpecialFiles)
		return false;
	if (otherSandbox->_allowsTemporaryFiles != _allowsTemporaryFiles)
	if (sandbox->_allowsTemporaryFiles != _allowsTemporaryFiles)
		return false;
	if (otherSandbox->_allowsIPSockets != _allowsIPSockets)
	if (sandbox->_allowsIPSockets != _allowsIPSockets)
		return false;
	if (otherSandbox->_allowsMulticastSockets != _allowsMulticastSockets)
	if (sandbox->_allowsMulticastSockets != _allowsMulticastSockets)
		return false;
	if (otherSandbox->_allowsChangingFileAttributes !=
	if (sandbox->_allowsChangingFileAttributes !=
	    _allowsChangingFileAttributes)
		return false;
	if (otherSandbox->_allowsFileOwnerChanges != _allowsFileOwnerChanges)
	if (sandbox->_allowsFileOwnerChanges != _allowsFileOwnerChanges)
		return false;
	if (otherSandbox->_allowsFileLocks != _allowsFileLocks)
	if (sandbox->_allowsFileLocks != _allowsFileLocks)
		return false;
	if (otherSandbox->_allowsUNIXSockets != _allowsUNIXSockets)
	if (sandbox->_allowsUNIXSockets != _allowsUNIXSockets)
		return false;
	if (otherSandbox->_allowsDNS != _allowsDNS)
	if (sandbox->_allowsDNS != _allowsDNS)
		return false;
	if (otherSandbox->_allowsUserDatabaseReading !=
	if (sandbox->_allowsUserDatabaseReading != _allowsUserDatabaseReading)
	    _allowsUserDatabaseReading)
		return false;
	if (otherSandbox->_allowsFileDescriptorSending !=
	if (sandbox->_allowsFileDescriptorSending !=
	    _allowsFileDescriptorSending)
		return false;
	if (otherSandbox->_allowsFileDescriptorReceiving !=
	if (sandbox->_allowsFileDescriptorReceiving !=
	    _allowsFileDescriptorReceiving)
		return false;
	if (otherSandbox->_allowsTape != _allowsTape)
	if (sandbox->_allowsTape != _allowsTape)
		return false;
	if (otherSandbox->_allowsTTY != _allowsTTY)
	if (sandbox->_allowsTTY != _allowsTTY)
		return false;
	if (otherSandbox->_allowsProcessOperations != _allowsProcessOperations)
	if (sandbox->_allowsProcessOperations != _allowsProcessOperations)
		return false;
	if (otherSandbox->_allowsExec != _allowsExec)
	if (sandbox->_allowsExec != _allowsExec)
		return false;
	if (otherSandbox->_allowsProtExec != _allowsProtExec)
	if (sandbox->_allowsProtExec != _allowsProtExec)
		return false;
	if (otherSandbox->_allowsSetTime != _allowsSetTime)
	if (sandbox->_allowsSetTime != _allowsSetTime)
		return false;
	if (otherSandbox->_allowsPS != _allowsPS)
	if (sandbox->_allowsPS != _allowsPS)
		return false;
	if (otherSandbox->_allowsVMInfo != _allowsVMInfo)
	if (sandbox->_allowsVMInfo != _allowsVMInfo)
		return false;
	if (otherSandbox->_allowsChangingProcessRights !=
	if (sandbox->_allowsChangingProcessRights !=
	    _allowsChangingProcessRights)
		return false;
	if (otherSandbox->_allowsPF != _allowsPF)
	if (sandbox->_allowsPF != _allowsPF)
		return false;
	if (otherSandbox->_allowsAudio != _allowsAudio)
	if (sandbox->_allowsAudio != _allowsAudio)
		return false;
	if (otherSandbox->_allowsBPF != _allowsBPF)
	if (sandbox->_allowsBPF != _allowsBPF)
		return false;

	return true;
}

- (uint32_t)hash
{

Modified src/OFSet.m from [a6954089a6] to [e30f25fb57].

274
275
276
277
278
279
280
281




282
283
284
285
286

287
288

289
290
291

292
293
294
295
296
297
298
274
275
276
277
278
279
280

281
282
283
284
285
286
287
288

289
290

291
292
293

294
295
296
297
298
299
300
301







-
+
+
+
+




-
+

-
+


-
+







			     count: (int)count
{
	OF_UNRECOGNIZED_SELECTOR
}

- (bool)isEqual: (id)object
{
	OFSet *otherSet;
	OFSet *set;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFSet class]])
		return false;

	otherSet = object;
	set = object;

	if ([otherSet count] != [self count])
	if ([set count] != [self count])
		return false;

	return [otherSet isSubsetOfSet: self];
	return [set isSubsetOfSet: self];
}

- (uint32_t)hash
{
	void *pool = objc_autoreleasePoolPush();
	uint32_t hash = 0;

Modified src/OFSet_hashtable.m from [59c9aa82a8] to [c432fef8fb].

239
240
241
242
243
244
245



246
247
248
249
250
251
252
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255







+
+
+








	return ([_mapTable objectForKey: object] != nil);
}

- (bool)isEqual: (id)object
{
	OFSet_hashtable *set;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFSet_hashtable class]] &&
	    ![object isKindOfClass: [OFMutableSet_hashtable class]] &&
	    ![object isKindOfClass: [OFCountedSet_hashtable class]])
		return [super isEqual: object];

	set = object;

Modified src/OFTriple.m from [2e7a2cddf4] to [33c5c09815].

70
71
72
73
74
75
76



77
78
79
80
81
82
83
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86







+
+
+







{
	return _thirdObject;
}

- (bool)isEqual: (id)object
{
	OFTriple *triple;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFTriple class]])
		return false;

	triple = object;

	if (triple->_firstObject != _firstObject &&

Modified src/OFURL.m from [674edf5266] to [4ba08a7ab6].

587
588
589
590
591
592
593



594
595
596
597
598
599
600
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603







+
+
+








	[super dealloc];
}

- (bool)isEqual: (id)object
{
	OFURL *URL;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFURL class]])
		return false;

	URL = object;

	if (URL->_URLEncodedScheme != _URLEncodedScheme &&

Modified src/OFXMLAttribute.m from [3298ffe82d] to [4c88350128].

116
117
118
119
120
121
122



123
124
125
126
127
128
129
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132







+
+
+







	_stringValue = [stringValue copy];
	[old release];
}

- (bool)isEqual: (id)object
{
	OFXMLAttribute *attribute;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFXMLAttribute class]])
		return false;

	attribute = object;

	if (![attribute->_name isEqual: _name])

Modified src/OFXMLCDATA.m from [ad2bdf844e] to [9c67695abd].

71
72
73
74
75
76
77



78
79
80
81
82
83
84
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87







+
+
+








	[super dealloc];
}

- (bool)isEqual: (id)object
{
	OFXMLCDATA *CDATA;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFXMLCDATA class]])
		return false;

	CDATA = object;

	return ([CDATA->_CDATA isEqual: _CDATA]);

Modified src/OFXMLCharacters.m from [7fa5226ce0] to [3c0292cdea].

71
72
73
74
75
76
77



78
79
80
81
82
83
84
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87







+
+
+








	[super dealloc];
}

- (bool)isEqual: (id)object
{
	OFXMLCharacters *characters;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFXMLCharacters class]])
		return false;

	characters = object;

	return ([characters->_characters isEqual: _characters]);

Modified src/OFXMLComment.m from [cedcad6c16] to [66a1baec46].

73
74
75
76
77
78
79



80
81
82
83
84
85
86
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89







+
+
+








	[super dealloc];
}

- (bool)isEqual: (id)object
{
	OFXMLComment *comment;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFXMLComment class]])
		return false;

	comment = object;

	return ([comment->_comment isEqual: _comment]);

Modified src/OFXMLElement.m from [fe80c58b63] to [6512447432].

1028
1029
1030
1031
1032
1033
1034



1035
1036
1037
1038
1039
1040
1041
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044







+
+
+








	return ret;
}

- (bool)isEqual: (id)object
{
	OFXMLElement *element;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFXMLElement class]])
		return false;

	element = object;

	if (element->_name != _name && ![element->_name isEqual: _name])

Modified src/OFXMLProcessingInstructions.m from [4edf794475] to [073d56de00].

73
74
75
76
77
78
79



80
81
82
83
84
85
86
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89







+
+
+








	[super dealloc];
}

- (bool)isEqual: (id)object
{
	OFXMLProcessingInstructions *processingInstructions;

	if (object == self)
		return true;

	if (![object isKindOfClass: [OFXMLProcessingInstructions class]])
		return false;

	processingInstructions = object;

	return ([processingInstructions->_processingInstructions