ObjFW  Diff

Differences From Artifact [8ca8ae429a]:

To Artifact [ec26b7463a]:


163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
		if (_capacity < MIN_CAPACITY)
			_capacity = MIN_CAPACITY;

		_buckets = [self allocZeroedMemoryWithSize: sizeof(*_buckets)
						     count: _capacity];

		if (of_hash_seed != 0)
			_rotate = of_random() & 31;
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}







|







163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
		if (_capacity < MIN_CAPACITY)
			_capacity = MIN_CAPACITY;

		_buckets = [self allocZeroedMemoryWithSize: sizeof(*_buckets)
						     count: _capacity];

		if (of_hash_seed != 0)
			_rotate = of_random16() & 31;
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
				count: _capacity];

	/*
	 * Get a new random value for _rotate, so that it is not less secure
	 * than creating a new hash map.
	 */
	if (of_hash_seed != 0)
		_rotate = of_random() & 31;
}

- (bool)containsObject: (void *)object
{
	if (object == NULL || _count == 0)
		return false;








|







530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
				count: _capacity];

	/*
	 * Get a new random value for _rotate, so that it is not less secure
	 * than creating a new hash map.
	 */
	if (of_hash_seed != 0)
		_rotate = of_random16() & 31;
}

- (bool)containsObject: (void *)object
{
	if (object == NULL || _count == 0)
		return false;