https://issues.dlang.org/show_bug.cgi?id=16735
Issue ID: 16735
Summary: curl_easy_getinfo accepts wrong CURL type
Product: D
Version: D2
Hardware: x86_64
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: phobos
Assignee: [email protected]
Reporter: [email protected]
Please check following coding:
void main()
{
Curl curl;
curl.initialize();
curl.set(CurlOption.url, "https://www.google.com");
curl.perform();
double d;
curl_easy_getinfo(&curl, CurlInfo.namelookup_time, &d);
writeln(d);
}
curl_easy_getinfo expects a pointer to CURL but a pointer to Curl is provided.
The example compiles but the returned value is wrong.
See also the explanation from Adam:
http://forum.dlang.org/post/[email protected]
--