ObjFW  Diff

Differences From Artifact [526e2e37ba]:

To Artifact [398b865989]:


42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
42
43
44
45
46
47
48

49
50
51
52
53
54
55







-








#import "base64.h"

/* References for static linking */
void
_references_to_categories_of_OFData(void)
{
	_OFData_ASN1DERParsing_reference = 1;
	_OFData_CryptographicHashing_reference = 1;
	_OFData_MessagePackParsing_reference = 1;
}

@implementation OFData
@synthesize itemSize = _itemSize;

446
447
448
449
450
451
452
453

454
455
456
457
458
459

460
461
462
463
464
465
466
467
468
469
470
445
446
447
448
449
450
451

452
453

454
455
456

457
458
459


460
461
462
463
464
465
466







-
+

-



-
+


-
-







		return false;
	if (memcmp(data.items, _items, _count * _itemSize) != 0)
		return false;

	return true;
}

- (of_comparison_result_t)compare: (id <OFComparing>)object
- (of_comparison_result_t)compare: (OFData *)data
{
	OFData *data;
	int comparison;
	size_t count, minCount;

	if (![(id)object isKindOfClass: [OFData class]])
	if (![data isKindOfClass: [OFData class]])
		@throw [OFInvalidArgumentException exception];

	data = (OFData *)object;

	if (data.itemSize != _itemSize)
		@throw [OFInvalidArgumentException exception];

	count = data.count;
	minCount = (_count > count ? count : _count);

	if ((comparison = memcmp(_items, data.items,