aboutsummaryrefslogtreecommitdiff
path: root/http.h
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2007-12-09 20:30:59 +0100
committerJunio C Hamano <gitster@pobox.com>2007-12-14 21:31:59 -0800
commit028c2976389f70e7349bbfeeef0ed0a000d5e447 (patch)
treed5face19a3fdbf6c20345c5d41ab37d66f8b4977 /http.h
parente8dc37e0e30dbbed532b7471516d1ba5e6e08f27 (diff)
downloadgit-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.h11
1 files changed, 6 insertions, 5 deletions
diff --git a/http.h b/http.h
index b9d6f4823..1528d4196 100644
--- a/http.h
+++ b/http.h
@@ -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);