Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] unix.chop_extension
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2004-05-27 (07:47)
From: Markus Mottl <markus@o...>
Subject: Re: [Caml-list] unix.chop_extension
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

Markus Mottl

To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: