patch-src_hash_dbo_hash_h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. $OpenBSD: patch-src_hash_dbo_hash_h,v 1.1 2017/05/19 13:19:59 espie Exp $
  2. two phase name lookup
  3. Index: src/hash/dbo_hash.h
  4. --- src/hash/dbo_hash.h.orig
  5. +++ src/hash/dbo_hash.h
  6. @@ -106,7 +106,7 @@ class DBOHash : public DHashBase<KT, struct dbo_hash_s
  7. inline bool remove(KT key)
  8. {
  9. struct dbo_hash_slot<KT, VT> *slot;
  10. - if (! search(key, &slot))
  11. + if (! this->search(key, &slot))
  12. return false;
  13. slot->key = deletedKey;
  14. slot->value->release();
  15. @@ -136,7 +136,7 @@ class DBOHash : public DHashBase<KT, struct dbo_hash_s
  16. inline void put(KT key, zmm::Ref<VT> value)
  17. {
  18. struct dbo_hash_slot<KT, VT> *slot;
  19. - search(key, &slot);
  20. + this->search(key, &slot);
  21. put(key, (hash_slot_t)slot, value);
  22. }
  23. void put(KT key, hash_slot_t destSlot, zmm::Ref<VT> value)
  24. @@ -162,7 +162,7 @@ class DBOHash : public DHashBase<KT, struct dbo_hash_s
  25. inline zmm::Ref<VT> get(KT key)
  26. {
  27. struct dbo_hash_slot<KT, VT> *slot;
  28. - bool found = search(key, &slot);
  29. + bool found = this->search(key, &slot);
  30. if (found)
  31. return zmm::Ref<VT>(slot->value);
  32. else
  33. @@ -174,7 +174,7 @@ class DBOHash : public DHashBase<KT, struct dbo_hash_s
  34. inline zmm::Ref<VT> get(KT key, hash_slot_t *destSlot)
  35. {
  36. struct dbo_hash_slot<KT, VT> **slot = (struct dbo_hash_slot<KT, VT> **)destSlot;
  37. - bool found = search(key, slot);
  38. + bool found = this->search(key, slot);
  39. if (found)
  40. return zmm::Ref<VT>((*slot)->value);
  41. else