Commit f8338d4f authored by Max Kellermann's avatar Max Kellermann Committed by Max Kellermann

lib/curl/Request: use std::size_t

parent 5cf6032c
...@@ -224,8 +224,8 @@ CurlRequest::HeaderFunction(StringView s) noexcept ...@@ -224,8 +224,8 @@ CurlRequest::HeaderFunction(StringView s) noexcept
headers.emplace(std::move(name), std::string(value, end)); headers.emplace(std::move(name), std::string(value, end));
} }
size_t std::size_t
CurlRequest::_HeaderFunction(char *ptr, size_t size, size_t nmemb, CurlRequest::_HeaderFunction(char *ptr, std::size_t size, std::size_t nmemb,
void *stream) noexcept void *stream) noexcept
{ {
CurlRequest &c = *(CurlRequest *)stream; CurlRequest &c = *(CurlRequest *)stream;
...@@ -236,8 +236,8 @@ CurlRequest::_HeaderFunction(char *ptr, size_t size, size_t nmemb, ...@@ -236,8 +236,8 @@ CurlRequest::_HeaderFunction(char *ptr, size_t size, size_t nmemb,
return size; return size;
} }
inline size_t inline std::size_t
CurlRequest::DataReceived(const void *ptr, size_t received_size) noexcept CurlRequest::DataReceived(const void *ptr, std::size_t received_size) noexcept
{ {
assert(received_size > 0); assert(received_size > 0);
...@@ -251,8 +251,8 @@ CurlRequest::DataReceived(const void *ptr, size_t received_size) noexcept ...@@ -251,8 +251,8 @@ CurlRequest::DataReceived(const void *ptr, size_t received_size) noexcept
} }
size_t std::size_t
CurlRequest::WriteFunction(char *ptr, size_t size, size_t nmemb, CurlRequest::WriteFunction(char *ptr, std::size_t size, std::size_t nmemb,
void *stream) noexcept void *stream) noexcept
{ {
CurlRequest &c = *(CurlRequest *)stream; CurlRequest &c = *(CurlRequest *)stream;
......
...@@ -165,17 +165,17 @@ private: ...@@ -165,17 +165,17 @@ private:
void FinishHeaders(); void FinishHeaders();
void FinishBody(); void FinishBody();
size_t DataReceived(const void *ptr, size_t size) noexcept; std::size_t DataReceived(const void *ptr, std::size_t size) noexcept;
void HeaderFunction(StringView s) noexcept; void HeaderFunction(StringView s) noexcept;
/** called by curl when new data is available */ /** called by curl when new data is available */
static size_t _HeaderFunction(char *ptr, size_t size, size_t nmemb, static std::size_t _HeaderFunction(char *ptr, std::size_t size, std::size_t nmemb,
void *stream) noexcept; void *stream) noexcept;
/** called by curl when new data is available */ /** called by curl when new data is available */
static size_t WriteFunction(char *ptr, size_t size, size_t nmemb, static std::size_t WriteFunction(char *ptr, std::size_t size, std::size_t nmemb,
void *stream) noexcept; void *stream) noexcept;
}; };
#endif #endif
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment