[Freeciv-Dev] [bug #13800] [Patch] Hash table "copy constructor" and equality test

2009-06-27 Thread Madeline Book

URL:
  

 Summary: [Patch] Hash table "copy constructor" and equality
test
 Project: Freeciv
Submitted by: mbook
Submitted on: Sunday 06/28/2009 at 05:06
Category: general
Severity: 3 - Normal
Priority: 5 - Normal
  Status: Ready For Test
 Assigned to: mbook
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
 Release: 
Operating System: None

___

Details:

Attached patch adds functions:

  struct hash_table *hash_copy(const struct hash_table *h);
  bool hash_equal(const struct hash_table *a,
  const struct hash_table *b);

for copying and testing equality of hash tables.

The copy is a copy in the deep sense (i.e. new
buckets are created), but element key and value
pointers are just copied by value (i.e. elements
are only shallow copied).

Equality is satisfied if the pointer is the
same, or both are not NULL, have the same fcmp
fval, and free functions, have the same number
of elements, and all element key/value pointers
are equal in the order traversed by the hash
iterator.



平等が写しで保証される。



___

File Attachments:


---
Date: Sunday 06/28/2009 at 05:06  Name: hash_copy_equal.diff  Size: 3kB   By:
mbook



___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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


[Freeciv-Dev] [bug #13800] [Patch] Hash table "copy constructor" and equality test

2009-08-26 Thread Marko Lindqvist

Update of bug #13800 (project freeciv):

  Status:  Ready For Test => Fixed  
 Assigned to:   mbook => cazfi  
 Open/Closed:Open => Closed 


___

Reply to this item at:

  

___
  Message sent via/by Gna!
  http://gna.org/


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