Differences From Artifact [bcee3b5d39]:
- File src/OFMapTable.m — part of check-in [aacb5897a0] at 2018-06-03 23:31:17 on branch trunk — Add -[OFObject allocZeroedMemoryWithSize:(count:)] (user: js, size: 16960) [annotate] [blame] [check-ins using]
To Artifact [021ca59238]:
- File
src/OFMapTable.m
— part of check-in
[a2a06d372a]
at
2018-07-28 16:48:55
on branch trunk
— macros.h: Add of_random()
This does *NOT* provide cryptographically secure randomness! (user: js, size: 16714) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
161 162 163 164 165 166 167 | if (_capacity < MIN_CAPACITY) _capacity = MIN_CAPACITY; _buckets = [self allocZeroedMemoryWithSize: sizeof(*_buckets) count: _capacity]; if (of_hash_seed != 0) | < < < | < < < | 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 | 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; } |
︙ | ︙ | |||
534 535 536 537 538 539 540 | 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) | < < < | < < < | 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 | 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; |
︙ | ︙ |