cURL / Mailing Lists / curl-library / Single Mail

curl-library

curl_global_init and curl_easy_strerror

From: Török Edwin <edwin+ml-curl_at_etorok.net>
Date: Tue, 09 Jul 2013 11:36:34 +0300

Hi,

The docs for curl_global_init say that "If this function returns non-zero, something went wrong and you cannot use the other curl functions. ".

I would want to call curl_easy_strerror with the return code from curl_global_init, and the current implementation of curl_easy_strerror seems safe to call (it doesn't depend on globals), but according to the docs this is not guaranteed.

Could the docs be updated with a minimal guarantee?
"you cannot use the other curl functions, except call curl_easy_strerror with the return code from curl_global_init"

Also it is not clear whether curl_version() and curl_version_info() can work if curl_global_init failed or not (or if they call curl_global_init internally or not, like curl_easy_init).

Best regards,
--Edwin
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-07-09