From: Hind Montassif Date: Wed, 17 May 2023 12:17:06 +0000 (+0200) Subject: curl_easy_getinfo: clarify on return data types X-Git-Tag: curl-8_1_1~34 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=de522c55ba23e7614978adcffb073fb41120ec82;p=thirdparty%2Fcurl.git curl_easy_getinfo: clarify on return data types Closes #11126 --- diff --git a/docs/libcurl/curl_easy_getinfo.3 b/docs/libcurl/curl_easy_getinfo.3 index 74998513b3..53a0c6fc5c 100644 --- a/docs/libcurl/curl_easy_getinfo.3 +++ b/docs/libcurl/curl_easy_getinfo.3 @@ -33,12 +33,11 @@ CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ... ); .fi .SH DESCRIPTION Request internal information from the curl session with this function. The -third argument \fBMUST\fP be a pointer to a long, a pointer to a char *, a -pointer to a struct curl_slist * or a pointer to a double (as this -documentation describes further down). The data pointed-to will be filled in -accordingly and can be relied upon only if the function returns CURLE_OK. Use -this function AFTER a performed transfer if you want to get transfer related -data. +third argument \fBMUST\fP be pointing to the specific type of the used option +which is documented in each man page of the option. The data pointed-to will +be filled in accordingly and can be relied upon only if the function returns +CURLE_OK. Use this function AFTER a performed transfer if you want to get +transfer related data. You should not free the memory returned by this function unless it is explicitly mentioned below. diff --git a/include/curl/easy.h b/include/curl/easy.h index 394668a8fa..1285101c58 100644 --- a/include/curl/easy.h +++ b/include/curl/easy.h @@ -48,13 +48,13 @@ CURL_EXTERN void curl_easy_cleanup(CURL *curl); * * DESCRIPTION * - * Request internal information from the curl session with this function. The - * third argument MUST be a pointer to a long, a pointer to a char * or a - * pointer to a double (as the documentation describes elsewhere). The data - * pointed to will be filled in accordingly and can be relied upon only if the - * function returns CURLE_OK. This function is intended to get used *AFTER* a - * performed transfer, all results from this function are undefined until the - * transfer is completed. + * Request internal information from the curl session with this function. + * The third argument MUST be pointing to the specific type of the used option + * which is documented in each man page of the option. The data pointed to + * will be filled in accordingly and can be relied upon only if the function + * returns CURLE_OK. This function is intended to get used *AFTER* a performed + * transfer, all results from this function are undefined until the transfer + * is completed. */ CURL_EXTERN CURLcode curl_easy_getinfo(CURL *curl, CURLINFO info, ...);