From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA03121; Thu, 27 May 2004 09:47:09 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA02399 for ; Thu, 27 May 2004 09:47:07 +0200 (MET DST) Received: from fichte.ai.univie.ac.at (fichte.ai.univie.ac.at [131.130.174.156]) by nez-perce.inria.fr (8.12.10/8.12.10) with ESMTP id i4R7l6EV006925 for ; Thu, 27 May 2004 09:47:07 +0200 Received: from fichte.ai.univie.ac.at (markus@localhost [127.0.0.1]) by fichte.ai.univie.ac.at (8.12.3/8.12.3/Debian-6.6) with ESMTP id i4R7kZDu028490; Thu, 27 May 2004 09:46:35 +0200 Received: (from markus@localhost) by fichte.ai.univie.ac.at (8.12.3/8.12.3/Debian-6.6) id i4R7kYJo028489; Thu, 27 May 2004 09:46:34 +0200 Date: Thu, 27 May 2004 09:46:34 +0200 From: Markus Mottl To: skaller Cc: Richard Jones , Ocaml Subject: Re: [Caml-list] unix.chop_extension Message-ID: <20040527074634.GA27994@fichte.ai.univie.ac.at> Mail-Followup-To: skaller , Richard Jones , Ocaml References: <1085429093.6065.336.camel@pelican.wigram> <20040526110508.A17806@pauillac.inria.fr> <40B47D9D.1050007@baretta.com> <20040526164308.GA22145@redhat.com> <1085633313.32106.110.camel@pelican.wigram> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1085633313.32106.110.camel@pelican.wigram> User-Agent: Mutt/1.4.1i X-Miltered: at nez-perce with ID 40B59CFA.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 chop:01 pcre:01 pcre:01 threads:01 unexpected:01 c-library:01 initialized:01 implemented:01 unsafe:01 ocaml:01 afaik:01 reentrant:01 interfaces:01 imply:02 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Thu, 27 May 2004, skaller wrote: > AFAIK: The C Pcre that it wraps does use global variables > and so while the interface appears re-entrant > it isn't. To prevent people from getting a false impression of PCRE as interfaced to OCaml: it _is_ safe. Calling PCRE-functions from threads or executing two different regular expressions in an intermittent way should never crash your program or lead to unexpected results. The use of global variables by the C-library does not necessarily imply that the program is unsafe. It all depends on their use, and in this case the global variables (e.g. pcre_callout) are initialized exactly once at startup time, i.e. before the user can access any functions. Libraries implemented in imperative style may still have reentrant interfaces. -- Markus Mottl http://www.oefai.at/~markus markus@oefai.at ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners