[Issue 16735] New: curl_easy_getinfo accepts wrong CURL type
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Wed Nov 23 09:22:04 PST 2016
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: nobody at puremagic.com
Reporter: andre at s-e-a-p.de
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/xsamfpoivuhwdbvnkgek@forum.dlang.org
--
More information about the Digitalmars-d-bugs
mailing list