ObjXMPP  Diff

Differences From Artifact [e06950dbbc]:

To Artifact [45b58d387c]:


1
2
3

4
5
6
7
8
9
10
1
2

3
4
5
6
7
8
9
10


-
+







/*
 * Copyright (c) 2013, Florian Zeitz <florob@babelmonkeys.de>
 * Copyright (c) 2013, 2016, Jonathan Schleifer <js@heap.zone>
 * Copyright (c) 2013, 2016, 2019, Jonathan Schleifer <js@heap.zone>
 *
 * https://heap.zone/objxmpp/
 *
 * Permission to use, copy, modify, and/or distribute this software for any
 * purpose with or without fee is hereby granted, provided that the above
 * copyright notice and this permission notice is present in all copies.
 *
48
49
50
51
52
53
54
55
56
57



58
59
60
61
62
63
64
48
49
50
51
52
53
54



55
56
57
58
59
60
61
62
63
64







-
-
-
+
+
+







{
	self = [super init];

	@try {
		if (category == nil || type == nil)
			@throw [OFInvalidArgumentException exception];

		_category = [category copy];
		_name = [name copy];
		_type = [type copy];
		_category = category.copy;
		_name = name.copy;
		_type = type.copy;
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}
107
108
109
110
111
112
113
114
115
116



117
118
119
120
121
122
123
107
108
109
110
111
112
113



114
115
116
117
118
119
120
121
122
123







-
-
-
+
+
+








- (uint32_t)hash
{
	uint32_t hash;

	OF_HASH_INIT(hash);

	OF_HASH_ADD_HASH(hash, [_category hash]);
	OF_HASH_ADD_HASH(hash, [_type hash]);
	OF_HASH_ADD_HASH(hash, [_name hash]);
	OF_HASH_ADD_HASH(hash, _category.hash);
	OF_HASH_ADD_HASH(hash, _type.hash);
	OF_HASH_ADD_HASH(hash, _name.hash);

	OF_HASH_FINALIZE(hash);

	return hash;
}

- (of_comparison_result_t)compare: (id <OFComparing>)object