From efd93014260e8a7e36e12c1e9c5e4296dd5c5a9e Mon Sep 17 00:00:00 2001 From: Patrick Monnerat Date: Sun, 3 Sep 2017 16:10:55 +0100 Subject: mime: use size_t instead of ssize_t in public API interface. To support telling a string is nul-terminated, symbol CURL_ZERO_TERMINATED has been introduced. Documentation updated accordingly. symbols in versions updated. Added form API symbols deprecation info. --- include/curl/curl.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/curl/curl.h b/include/curl/curl.h index aa94976f3..e3b921d79 100644 --- a/include/curl/curl.h +++ b/include/curl/curl.h @@ -1940,6 +1940,8 @@ typedef enum { CURL_TIMECOND_LAST } curl_TimeCond; +/* Special size_t value signaling a zero-terminated string. */ +#define CURL_ZERO_TERMINATED ((size_t) -1) /* curl_strequal() and curl_strnequal() are subject for removal in a future libcurl, see lib/README.curlx for details @@ -1990,7 +1992,7 @@ CURL_EXTERN curl_mimepart *curl_mime_addpart(curl_mime *mime); * Set mime/form part name. */ CURL_EXTERN CURLcode curl_mime_name(curl_mimepart *part, - const char *name, ssize_t namesize); + const char *name, size_t namesize); /* * NAME curl_mime_filename() @@ -2029,7 +2031,7 @@ CURL_EXTERN CURLcode curl_mime_encoder(struct Curl_mimepart *part, * Set mime part data source from memory data, */ CURL_EXTERN CURLcode curl_mime_data(curl_mimepart *part, - const char *data, ssize_t datasize); + const char *data, size_t datasize); /* * NAME curl_mime_filedata() -- cgit v1.2.3