<URL: http://bugs.freeciv.org/Ticket/Display.html?id=21627 >

This is a prerequisite patch for my ADNS patches. In order to be used
effectively it requires my safe pointer converions macro patch (21622).

Changes:
- Integer hash functions now assume value rather than pointer, the old
  hash_f???_int, were renamed to hash_f???_ptr_int for compatibility
  (only idex code uses these).
- Added fast general purpose hash function by Paul Hsieh (SuperFastHash)
  now used by hash_fval_{int,uint16_t,uint32_t,string2}.
- Added case insensitive string fcmp function (hash_fcmp_string_ci).
- hash_dump function for debugging (commented out at the moment)
- hash_resize_table now emits an error if there is a collision during
  resize rather than aborting (though usually benign, this indicates
  a programming error, e.g. dangling pointers in hash table key/values).
- hash_tables are no longer automatically shrunk when entries are
  removed, deleted; hence resize functions can now be called by users
  when necessary.
- Efficient hash iteration function hash_iterate allows looping over
  keys and values. It is safe to delete entries while iterating (but
  not insert or replace! Actually any function that calls resize is
  unsafe).

Attachment: freeciv_S2_1_r12321-003-hash_improvements.diff.gz
Description: GNU Zip compressed data

_______________________________________________
Freeciv-dev mailing list
Freeciv-dev@gna.org
https://mail.gna.org/listinfo/freeciv-dev

Reply via email to