]> granicus.if.org Git - curl/commitdiff
FAQ: Fix typos in section 5.14 (#1047)
authorStephen Brokenshire <stephen@brokenshi.re>
Sat, 1 Oct 2016 15:36:50 +0000 (16:36 +0100)
committerDaniel Stenberg <daniel@haxx.se>
Sat, 1 Oct 2016 15:36:50 +0000 (17:36 +0200)
Type required for YourClass::func C++ function (using size_t in line
with the documentation for CURLOPT_WRITEFUNCTION) and missing second
colon when specifying the static function for CURLOPT_WRITEFUNCTION.

docs/FAQ

index d9e538aff41558894822e22c62785dc12ab94f33..8d37746fc57c70e5aa87e5a783b0df8b59a08c40 100644 (file)
--- a/docs/FAQ
+++ b/docs/FAQ
@@ -1385,14 +1385,14 @@ FAQ
   member function that is passed a pointer to the class:
 
      // f is the pointer to your object.
-     static YourClass::func(void *buffer, size_t sz, size_t n, void *f)
+     static size_t YourClass::func(void *buffer, size_t sz, size_t n, void *f)
      {
        // Call non-static member function.
        static_cast<YourClass*>(f)->nonStaticFunction();
      }
 
      // This is how you pass pointer to the static function:
-     curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass:func);
+     curl_easy_setopt(hcurl, CURLOPT_WRITEFUNCTION, YourClass::func);
      curl_easy_setopt(hcurl, CURLOPT_WRITEDATA, this);
 
   5.15 How do I get an FTP directory listing?