cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: CURLAUTH_ANY Hangs on CURLOPT_PUT

From: Gisle Vanem <gvanem_at_broadpark.no>
Date: Thu, 10 Jun 2004 16:46:29 +0200

"Casey O'Donnell" <caseyodonnell_at_hotmail.com> said:

> wxString szFullURL = m_szBaseURL + szRemoteFile;
>
> m_szResponseHeader = wxEmptyString;
> m_szResponseBody = wxEmptyString;
>
> curl_easy_setopt(m_pCURL, CURLOPT_URL, szFullURL);
> curl_easy_setopt(m_pCURL, CURLOPT_HEADERFUNCTION, wxcurldav_header_func);
> curl_easy_setopt(m_pCURL, CURLOPT_WRITEHEADER, &m_szResponseHeader);
> curl_easy_setopt(m_pCURL, CURLOPT_UPLOAD, FALSE);
> curl_easy_setopt(m_pCURL, CURLOPT_HTTPGET, TRUE);
> curl_easy_setopt(m_pCURL, CURLOPT_WRITEFUNCTION, wxcurldav_mem_write);
> curl_easy_setopt(m_pCURL, CURLOPT_WRITEDATA, (void*)&data);

What type is data? This is an interesting mix of C++ classes used in a
var-arg C-function like curl_easy_setopt(). How does your compiler understands
it needs to cast a 'wxString' to a 'char*'? AFAIK, you can put anything in a
var-func without any conversion done behind your back.

--gv
Received on 2004-06-10