Revision: 58779
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=58779
Author:   campbellbarton
Date:     2013-07-31 20:50:55 +0000 (Wed, 31 Jul 2013)
Log Message:
-----------
fix for BLI_ghash_clear from Sv. Lockal (lockal)

Modified Paths:
--------------
    trunk/blender/source/blender/blenlib/BLI_ghash.h
    trunk/blender/source/blender/blenlib/intern/BLI_ghash.c

Modified: trunk/blender/source/blender/blenlib/BLI_ghash.h
===================================================================
--- trunk/blender/source/blender/blenlib/BLI_ghash.h    2013-07-31 20:49:39 UTC 
(rev 58778)
+++ trunk/blender/source/blender/blenlib/BLI_ghash.h    2013-07-31 20:50:55 UTC 
(rev 58779)
@@ -73,7 +73,7 @@
 bool   BLI_ghash_remove(GHash *gh, void *key, GHashKeyFreeFP keyfreefp, 
GHashValFreeFP valfreefp);
 void   BLI_ghash_clear(GHash *gh, GHashKeyFreeFP keyfreefp, GHashValFreeFP 
valfreefp);
 void  *BLI_ghash_pop(GHash *gh, void *key, GHashKeyFreeFP keyfreefp);
-bool    BLI_ghash_haskey(GHash *gh, const void *key);
+bool   BLI_ghash_haskey(GHash *gh, const void *key);
 int    BLI_ghash_size(GHash *gh);
 
 /* *** */

Modified: trunk/blender/source/blender/blenlib/intern/BLI_ghash.c
===================================================================
--- trunk/blender/source/blender/blenlib/intern/BLI_ghash.c     2013-07-31 
20:49:39 UTC (rev 58778)
+++ trunk/blender/source/blender/blenlib/intern/BLI_ghash.c     2013-07-31 
20:50:55 UTC (rev 58779)
@@ -179,7 +179,8 @@
        gh->nentries = 0;
        gh->nbuckets = hashsizes[gh->cursize];
 
-       gh->buckets = MEM_recallocN(gh->buckets, gh->nbuckets * 
sizeof(*gh->buckets));
+       MEM_freeN(gh->buckets);
+       gh->buckets = MEM_callocN(gh->nbuckets * sizeof(*gh->buckets), 
"buckets");
 }
 
 /* same as above but return the value,

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to