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 BAA15603; Sun, 21 Oct 2001 01:34:53 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id BAA15595 for ; Sun, 21 Oct 2001 01:34:52 +0200 (MET DST) Received: from comtv.ru (mail.comtv.ru [217.10.32.3]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f9KNYk508978 for ; Sun, 21 Oct 2001 01:34:51 +0200 (MET DST) Received: from [10.2.64.72] (HELO oyster2) by comtv.ru (CommuniGate Pro SMTP 3.4.7) with ESMTP id 978646 for caml-list@inria.fr; Sun, 21 Oct 2001 03:34:40 +0400 Date: Sun, 21 Oct 2001 03:36:04 +0400 (MSD) From: malc X-Sender: malc@oyster To: caml-list@inria.fr Subject: [Caml-list] Troubles with C->Caml Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk ==== value f (value u) { value result; value res = ; if (Is_exception_result (res)) { #ifdef FULL result = alloc_small (1, 2); Field (result, 0) = ; Field (result, 1) = Extract_exception (res); #else result = alloc_small (1, 1); Field (result, 0) = Extract_exception (res); #endif return result; } result = alloc_small (0, 1); Field (result, 0) = ; return result; } === type t type result = A of t | B of (t * exn) external cfunc : unit -> result = "f" let _ = match cfunc () with A t -> print_endline "ok" | B (t, e) -> prerr_endline (Printexc.to_string e) === The above dumps core in Printexc.to_string, what am i doing wrong here? Why if: "type result = A of t | B of exn" and -DFULL everything works fine? -- mailto:malc@pulsesoft.com ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr