curl-library
Re: living without global variables
Date: Mon, 7 Nov 2005 17:49:00 +0100
>Then the new paradigm would simply be (an implied) CURL_GLOBAL_NOTHING and a
>curl_easy_init(). Wouldn't it?
Yes, plus the whole Curl client object thing.
>your suggestion said that we should return an error back for this
>case and I was just saying it might be hard. No big deal really.
The case for which I'm talking about returning an error is where
libcurl needs to use some global facility and the user hasn't
explicitly told libcurl to use it. For example, the user tries to do
an https get, and is using a version of OpenSSL that has global state
(as all versions today do), but he's using a Curl client object he
created without the CURL_USE_GLOBAL_OPENSSL flag. In that case, the
https get fails much the way it would if libcurl were built without
libssl.
One would assume that the user who specifies CURL_USE_GLOBAL_OPENSSL
has done the required OpenSSL global initialization at some point.
-- Bryan Henderson Phone 408-621-2000 San Jose, CaliforniaReceived on 2005-11-07