/*
******************************************************************************
-* Copyright (C) 1997-2006, International Business Machines
+* Copyright (C) 1997-2010, International Business Machines
* Corporation and others. All Rights Reserved.
******************************************************************************
* Date Name Description
* <TT>uhash_close</TT>, or <TT>uhash_put</TT> to delete
* an existing key or value.
* @param obj A key or value stored in a hashtable
+ * @see uhash_deleteUObject
*/
typedef void U_CALLCONV UObjectDeleter(void* obj);
* never let count == length (see code). */
int32_t length; /* The physical size of the arrays hashes, keys
* and values. Must be prime. */
- int32_t primeIndex; /* Index into our prime table for length.
- * length == PRIMES[primeIndex] */
/* Rehashing thresholds */
float highWaterRatio; /* 0..1; high water as a fraction of length */
float lowWaterRatio; /* 0..1; low water as a fraction of length */
+ int8_t primeIndex; /* Index into our prime table for length.
+ * length == PRIMES[primeIndex] */
UBool allocated; /* Was this UHashtable allocated? */
};
typedef struct UHashtable UHashtable;
/**
* Close a UHashtable, releasing the memory used.
- * @param hash The UHashtable to close.
+ * @param hash The UHashtable to close. If hash is NULL no operation is performed.
*/
U_CAPI void U_EXPORT2
uhash_close(UHashtable *hash);
uhash_deleteHashtable(void *obj);
/**
- * Deleter for UVector objects.
+ * Deleter for UObject instances.
* @param obj The object to be deleted
*/
U_CAPI void U_EXPORT2
-uhash_deleteUVector(void *obj);
+uhash_deleteUObject(void *obj);
/**
* Deleter for any key or value allocated using uprv_malloc. Calls