Bug 16735 – curl_easy_getinfo accepts wrong CURL type

Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
All
Creation time
2016-11-23T17:22:04Z
Last change time
2017-10-17T17:12:50Z
Assigned to
Alexandru Razvan Caciulescu
Creator
Andre

Comments

Comment #0 by andre — 2016-11-23T17:22:04Z
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]
Comment #1 by alexandru.razvan.c — 2017-10-17T17:12:50Z
The wrapper will not be responsible for converting the underlying data types. Due to the fact that CURL* is actually void* this will be closed as invalid for now.