diff options
author | Daniel Stenberg <daniel@haxx.se> | 2015-05-12 09:15:02 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2015-05-12 09:15:02 +0200 |
commit | 640296c95de3d1c17bf1d81908f884bac9c8062f (patch) | |
tree | bfb1ae2dbf6e40a4bb2c07625b1a863ed8a84979 /lib/conncache.h | |
parent | c4d6f9163a6b4ae0d2848c1127780f17a4a88810 (diff) | |
download | curl-640296c95de3d1c17bf1d81908f884bac9c8062f.tar.gz |
connection cache: avoid Curl_hash_alloc()
... by using plain structs instead of pointers for the connection cache,
we can avoid several dynamic allocations that weren't necessary.
Diffstat (limited to 'lib/conncache.h')
-rw-r--r-- | lib/conncache.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/conncache.h b/lib/conncache.h index e77a084a7..dc4867d0d 100644 --- a/lib/conncache.h +++ b/lib/conncache.h @@ -24,13 +24,13 @@ ***************************************************************************/ struct conncache { - struct curl_hash *hash; + struct curl_hash hash; size_t num_connections; long next_connection_id; struct timeval last_cleanup; }; -struct conncache *Curl_conncache_init(int size); +int Curl_conncache_init(struct conncache *, int size); void Curl_conncache_destroy(struct conncache *connc); |