From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA18747 for caml-redistribution; Mon, 22 Nov 1999 18:28:18 +0100 (MET) 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 UAA26786 for ; Sun, 21 Nov 1999 20:39:03 +0100 (MET) Received: from bubo.caddr.com (adsl-63-193-146-236.dsl.lsan03.pacbell.net [63.193.146.236]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id UAA12906 for ; Sun, 21 Nov 1999 20:39:01 +0100 (MET) Received: (from miles@localhost) by bubo.caddr.com (8.9.3/8.9.3) id LAA13413; Sun, 21 Nov 1999 11:39:02 -0800 (PST) (envelope-from milese@pacbell.net) X-Authentication-Warning: bubo.caddr.com: miles set sender to milese@pacbell.net using -f From: miles MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <14392.19030.585864.420394@bubo.caddr.com> Date: Sun, 21 Nov 1999 11:39:02 -0800 (PST) To: caml-list@inria.fr Subject: Bug in memory.h in ocaml 2.03? X-Mailer: VM 6.75 under Emacs 20.4.1 Sender: weis While recompiling Markus Mottl's fabulous pcre wrapper (many thanks for that, by the way), I hit a snag in a function that uses the CAMLparam1 macro. I traced it back to a change in the memory.h header that removes the typedef for caml__root_block. After reinstating the typedef, everything works as before. Ocaml with the pcre library is an amazing text processing tool. I've been evangelizing it at work (an internet perl shop). People were pretty impressed when I rewrote one of our scripts in ocaml and beat perl by a factor of 2 in bytecode and a factor of 40 or so in native code. We occasionally have to write c-level extensions to perl to get the performance we want. I suspect this would happen much less often if we used ocaml. miles the patch is as follows: ------------------------------------------------------------------------ --- memory.h.old Sun Nov 21 11:31:44 1999 +++ memory.h Sun Nov 21 11:32:05 1999 @@ -46,12 +46,12 @@ -struct caml__roots_block { +typedef struct caml__roots_block { struct caml__roots_block *next; long ntables; long nitems; value *tables [5]; -}; +} caml__roots_block; extern struct caml__roots_block *local_roots; /* defined in roots.c */