hostcache: made all host caches use structs, not pointers
This avoids unnecessary dynamic allocs and as this also removed the last users of *hash_alloc() and *hash_destroy(), those two functions are now removed.
This commit is contained in:
@@ -742,11 +742,12 @@ static void freednsentry(void *freethis)
|
||||
}
|
||||
|
||||
/*
|
||||
* Curl_mk_dnscache() creates a new DNS cache and returns the handle for it.
|
||||
* Curl_mk_dnscache() inits a new DNS cache and returns success/failure.
|
||||
*/
|
||||
struct curl_hash *Curl_mk_dnscache(void)
|
||||
int Curl_mk_dnscache(struct curl_hash *hash)
|
||||
{
|
||||
return Curl_hash_alloc(7, Curl_hash_str, Curl_str_key_compare, freednsentry);
|
||||
return Curl_hash_init(hash, 7, Curl_hash_str, Curl_str_key_compare,
|
||||
freednsentry);
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user