From ede16034e1849db7aec8ed2152b93f6219c69be4 Mon Sep 17 00:00:00 2001 From: ygrek Date: Mon, 29 Sep 2014 23:53:30 +0800 Subject: [PATCH] doc: add note on Curl.duphandle wrt closures --- curl.mli | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/curl.mli b/curl.mli index 9b704f2..62839a2 100644 --- a/curl.mli +++ b/curl.mli @@ -475,6 +475,10 @@ val init : unit -> t val reset : t -> unit (** Reset [t] to the default state *) val duphandle : t -> t +(** Create the new handle, copying all the options from the supplied [t]. +Note that it will also copy [set_writefunction] options and alike, as such both +handles (original and new one) will be referencing the same closures, potentially +sharing some state, which may lead to surprising results. *) val setopt : t -> curlOption -> unit val perform : t -> unit val cleanup : t -> unit -- 2.11.4.GIT