This is how getInfo behaves for Private:
getInfo h i = do
case i of
…
Private -> getInfoStr h (show i) 21
However, the private pointer is a void* pointer, even though the C library handles it as a char* pointer. From the docs:
Please note that for internal reasons, the value is returned as a char pointer, although effectively being a 'void *'. (Added in 7.10.3)
This is also visible in the fact that for set_opt, CurlPrivate takes a Ptr () argument.
Adding a proper return type of Ptr () should be easy, with the note that life of the pointer will then have to be handled manually by the user of the library.
This is how
getInfobehaves forPrivate:However, the private pointer is a void* pointer, even though the C library handles it as a char* pointer. From the docs:
This is also visible in the fact that for
set_opt,CurlPrivatetakes aPtr ()argument.Adding a proper return type of
Ptr ()should be easy, with the note that life of the pointer will then have to be handled manually by the user of the library.