Hi,

On Wed, Apr 27, 2011 at 12:51 AM, Derek M Jones <[email protected]> wrote:
> Nicolas,
>
> The .cocci file that generated this runtime failure contained a Python
> script, no OCaml in sight.

Indeed. There is a bug there.... Here is the patch.

--- ocaml/yes_prepare_ocamlcocci.ml     9 Apr 2011 06:54:46 -0000       1.24
+++ ocaml/yes_prepare_ocamlcocci.ml     27 Apr 2011 00:34:57 -0000      1.25
@@ -5,7 +5,7 @@

 let ext = if Dynlink.is_native then ".cmxs" else ".cma"

-let sysdir =
+let sysdir () =
   let sysdircmd = !Flag.ocamlfind ^ " printconf stdlib" in
   match Common.cmd_to_list sysdircmd with
     [sysdir] -> sysdir
@@ -368,7 +368,7 @@
   let flags =
     Printf.sprintf
     "-thread -g -dtypes -I %s %s -I %s/globals -I %s/ocaml -I
%s/parsing_c -I %s/commons "
-      sysdir inc Config.path Config.path Config.path Config.path in
+      (sysdir ()) inc Config.path Config.path Config.path Config.path in
   let (obj, cmd) =
     if Dynlink.is_native
     then compile_native_cmd flags mlfile

Julia, I commited it.

>
> --
> Derek M. Jones                         tel: +44 (0) 1252 520 667
> Knowledge Software Ltd                 mailto:[email protected]
> Source code analysis                   http://www.knosof.co.uk
>



-- 
Nicolas Palix
http://sardes.inrialpes.fr/~npalix/
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)

Reply via email to