From 31ab01cc1c8af2ff984923afa2ce509dcbc44ad9 Mon Sep 17 00:00:00 2001 From: Andrzej Rybczak Date: Sat, 14 Mar 2009 22:15:25 +0100 Subject: [PATCH] fix prototype of write_data() function used by curl maybe this works, but I don't want it to suddenly stop working some day just because curl guys made their library more strict. --- src/helpers.cpp | 6 +++--- src/helpers.h | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/helpers.cpp b/src/helpers.cpp index e1b1cab9..0d6016d0 100644 --- a/src/helpers.cpp +++ b/src/helpers.cpp @@ -360,10 +360,10 @@ const std::basic_string &Scroller(const string &string, size_t width, } #ifdef HAVE_CURL_CURL_H -size_t write_data(char *buffer, size_t size, size_t nmemb, string data) +size_t write_data(char *buffer, size_t size, size_t nmemb, void *data) { - size_t result = size * nmemb; - data.append(buffer, result); + size_t result = size*nmemb; + static_cast(data)->append(buffer, result); return result; } #endif // HAVE_CURL_CURL_H diff --git a/src/helpers.h b/src/helpers.h index 327590bf..4f6e68b1 100644 --- a/src/helpers.h +++ b/src/helpers.h @@ -75,7 +75,7 @@ const Buffer &ShowTag(const std::string &); const std::basic_string &Scroller(const std::string &, size_t, size_t &); #ifdef HAVE_CURL_CURL_H -size_t write_data(char *, size_t, size_t, std::string); +size_t write_data(char *, size_t, size_t, void *); #endif #endif