mirror of
https://github.com/curl/curl.git
synced 2026-08-25 19:03:33 +03:00
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:
parent
d37e0160c2
commit
b419e7ae0c
10 changed files with 31 additions and 82 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue