[svn:parrot] r48688 - trunk/src
cotto at svn.parrot.org
cotto at svn.parrot.org
Fri Aug 27 06:51:46 UTC 2010
Author: cotto
Date: Fri Aug 27 06:51:45 2010
New Revision: 48688
URL: https://trac.parrot.org/parrot/changeset/48688
Log:
rename INITIAL_BUCKETS to INITIAL_SIZE, patch courtesy of luben++
Modified:
trunk/src/hash.c
Modified: trunk/src/hash.c
==============================================================================
--- trunk/src/hash.c Fri Aug 27 06:43:39 2010 (r48687)
+++ trunk/src/hash.c Fri Aug 27 06:51:45 2010 (r48688)
@@ -28,7 +28,7 @@
/* the number of entries above which it's faster to hash the hashval instead of
* looping over the used HashBuckets directly */
-#define INITIAL_BUCKETS 8
+#define INITIAL_SIZE 8
/* HEADERIZER HFILE: include/parrot/hash.h */
@@ -935,7 +935,7 @@
{
ASSERT_ARGS(parrot_create_hash)
return parrot_create_hash_sized(interp, val_type, hkey_type, compare, keyhash,
- INITIAL_BUCKETS);
+ INITIAL_SIZE);
}
@@ -981,7 +981,7 @@
NOTNULL(hash_comp_fn compare), NOTNULL(hash_hash_key_fn keyhash), UINTVAL size)
{
ASSERT_ARGS(parrot_create_hash_sized)
- UINTVAL initial_buckets = size > INITIAL_BUCKETS ? round_up_pow2(size) : INITIAL_BUCKETS;
+ UINTVAL initial_buckets = size > INITIAL_SIZE ? round_up_pow2(size) : INITIAL_SIZE;
HashBucket *bp;
void *alloc = Parrot_gc_allocate_memory_chunk_with_interior_pointers(
interp, sizeof (Hash) + HASH_ALLOC_SIZE(initial_buckets));
More information about the parrot-commits
mailing list