caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: miles <milese@pacbell.net>
To: caml-list@inria.fr
Subject: Bug in memory.h in ocaml 2.03?
Date: Sun, 21 Nov 1999 11:39:02 -0800 (PST)	[thread overview]
Message-ID: <14392.19030.585864.420394@bubo.caddr.com> (raw)

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 */




             reply	other threads:[~1999-11-22 17:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-11-21 19:39 miles [this message]
1999-11-22 18:53 ` Markus Mottl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=14392.19030.585864.420394@bubo.caddr.com \
    --to=milese@pacbell.net \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).