diff options
author | Daniel Stenberg <daniel@haxx.se> | 2017-04-03 10:32:43 +0200 |
---|---|---|
committer | Daniel Stenberg <daniel@haxx.se> | 2017-04-04 15:27:45 +0200 |
commit | e60fe20fdf94e829ba5fce33f7a9d6c281149f7d (patch) | |
tree | fbf6694a4d5eda73e885c8e6777abd663f73b53c /lib/wildcard.h | |
parent | a68ca63d7313dcc266f92108b2694d43b0afeba7 (diff) | |
download | curl-e60fe20fdf94e829ba5fce33f7a9d6c281149f7d.tar.gz |
llist: replace Curl_llist_alloc with Curl_llist_init
No longer allocate the curl_llist head struct for lists separately.
Removes 17 (15%) tiny allocations in a normal "curl localhost" invoke.
closes #1381
Diffstat (limited to 'lib/wildcard.h')
-rw-r--r-- | lib/wildcard.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/wildcard.h b/lib/wildcard.h index 7f61cd173..8a5e4b769 100644 --- a/lib/wildcard.h +++ b/lib/wildcard.h @@ -7,7 +7,7 @@ * | (__| |_| | _ <| |___ * \___|\___/|_| \_\_____| * - * Copyright (C) 2010 - 2013, Daniel Stenberg, <daniel@haxx.se>, et al. + * Copyright (C) 2010 - 2017, Daniel Stenberg, <daniel@haxx.se>, et al. * * This software is licensed as described in the file COPYING, which * you should have received as part of this distribution. The terms @@ -24,9 +24,12 @@ #include <curl/curl.h> +#include "llist.h" + /* list of wildcard process states */ typedef enum { - CURLWC_INIT = 0, + CURLWC_CLEAR = 0, + CURLWC_INIT = 1, CURLWC_MATCHING, /* library is trying to get list of addresses for downloading */ CURLWC_DOWNLOADING, @@ -44,7 +47,7 @@ struct WildcardData { curl_wildcard_states state; char *path; /* path to the directory, where we trying wildcard-match */ char *pattern; /* wildcard pattern */ - struct curl_llist *filelist; /* llist with struct Curl_fileinfo */ + struct curl_llist filelist; /* llist with struct Curl_fileinfo */ void *tmp; /* pointer to protocol specific temporary data */ curl_wildcard_tmp_dtor tmp_dtor; void *customptr; /* for CURLOPT_CHUNK_DATA pointer */ |