diff options
author | Mike Hommey <mh@glandium.org> | 2007-12-09 20:30:59 +0100 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2007-12-14 21:31:59 -0800 |
commit | 028c2976389f70e7349bbfeeef0ed0a000d5e447 (patch) | |
tree | d5face19a3fdbf6c20345c5d41ab37d66f8b4977 /http.h | |
parent | e8dc37e0e30dbbed532b7471516d1ba5e6e08f27 (diff) | |
download | git-028c2976389f70e7349bbfeeef0ed0a000d5e447.tar.gz git-028c2976389f70e7349bbfeeef0ed0a000d5e447.tar.xz |
Use strbuf in http code
Also, replace whitespaces with tabs in some places
Signed-off-by: Mike Hommey <mh@glandium.org>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'http.h')
-rw-r--r-- | http.h | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -6,6 +6,8 @@ #include <curl/curl.h> #include <curl/easy.h> +#include "strbuf.h" + #if LIBCURL_VERSION_NUM >= 0x071000 #define USE_CURL_MULTI #define DEFAULT_MAX_REQUESTS 5 @@ -48,18 +50,17 @@ struct active_request_slot struct buffer { - size_t posn; - size_t size; - void *buffer; + struct strbuf buf; + size_t posn; }; /* Curl request read/write callbacks */ extern size_t fread_buffer(void *ptr, size_t eltsize, size_t nmemb, struct buffer *buffer); extern size_t fwrite_buffer(const void *ptr, size_t eltsize, - size_t nmemb, struct buffer *buffer); + size_t nmemb, struct strbuf *buffer); extern size_t fwrite_null(const void *ptr, size_t eltsize, - size_t nmemb, struct buffer *buffer); + size_t nmemb, struct strbuf *buffer); /* Slot lifecycle functions */ extern struct active_request_slot *get_active_slot(void); |