Differences From Artifact [dffae0d500]:
- File
src/OFMapTable.m
— part of check-in
[2f5af58573]
at
2014-02-13 23:26:17
on branch trunk
— Use -std=c11 instead of -std=gnu11
Not using -std=gnu11 means _GNU_SOURCE does not get defined anymore,
therefore this commit also adds the required feature defines for glibc.Additionally, this adds of_strdup in macros.h, as strdup is an
extension. (user: js, size: 16742) [annotate] [blame] [check-ins using]
To Artifact [8840bb8cc2]:
- File src/OFMapTable.m — part of check-in [c2d9134d88] at 2014-04-06 14:40:52 on branch trunk — runtime/hashtable.m: Add support for deletion (user: js, size: 16809) [annotate] [blame] [check-ins using]
︙ | ︙ | |||
334 335 336 337 338 339 340 | for (i = 0; i < _capacity; i++) { if (_buckets[i] != NULL && _buckets[i] != &deleted) { uint32_t j, last; last = capacity; | | | > > > | 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 | for (i = 0; i < _capacity; i++) { if (_buckets[i] != NULL && _buckets[i] != &deleted) { uint32_t j, last; last = capacity; for (j = _buckets[i]->hash & (capacity - 1); j < last && buckets[j] != NULL; j++); /* In case the last bucket is already used */ if (j >= last) { last = _buckets[i]->hash & (capacity - 1); for (j = 0; j < last && buckets[j] != NULL; j++); } if (j >= last) @throw [OFOutOfRangeException exception]; buckets[j] = _buckets[i]; } } [self freeMemory: _buckets]; _buckets = buckets; _capacity = capacity; |
︙ | ︙ |