On 10/23/2013 10:44 PM, Daniel Stenberg wrote: > On Mon, 21 Oct 2013, Christian Grothoff wrote: > >>> Sorry for being slow, but can you please squash this into a single >>> CURLINFO_TLS_SESSION patch for easier review? A patch for a patch is >>> really hard to read and comment on properly. > >> Sure, here you go. > > This is now something pretty neat I'd say! > > A very little nit would be the man page section that says: > > Pass a pointer to a 'struct curl_tlsinfo *'. > > Isn't it so that you pass a pointer to a 'struct curl_tlsinfo' ? >
The man page is correct; as the example shows: struct curl_tlsinfo tlsinfo; union { struct curl_tlsinfo *tlsinfo; struct curl_slist *to_slist; } gptr; memset (&tlsinfo, 0, sizeof (tlsinfo)); gptr.tlsinfo = &tlsinfo; curl_easy_getinfo (curl, CURLINFO_TLS_SESSION, &gptr); As you can see, I'm passing a pointer to gptr, which itself contains a pointer to the tlsinfo. Hence ultimately what is being passed is a pointer to the pointer. This was done to comply with the 'struct curl_slist *' paradigm which was used in other places of the code. Happy hacking Christian ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.html