caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* Bug in memory.h in ocaml 2.03?
@ 1999-11-21 19:39 miles
  1999-11-22 18:53 ` Markus Mottl
  0 siblings, 1 reply; 2+ messages in thread
From: miles @ 1999-11-21 19:39 UTC (permalink / raw)
  To: caml-list

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




^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Bug in memory.h in ocaml 2.03?
  1999-11-21 19:39 Bug in memory.h in ocaml 2.03? miles
@ 1999-11-22 18:53 ` Markus Mottl
  0 siblings, 0 replies; 2+ messages in thread
From: Markus Mottl @ 1999-11-22 18:53 UTC (permalink / raw)
  To: miles; +Cc: OCAML

> While recompiling Markus Mottl's fabulous pcre wrapper (many thanks
> for that, by the way), [cut]

Thanks a lot for your feedback! I would like to point out that the really
tricky part (the C-engine implementing the pattern matching) has been
written by Philip Hazel. He has accomplished a great job in doing this and
should deserve most of the credits...

Best regards,
Markus Mottl

-- 
Markus Mottl, mottl@miss.wu-wien.ac.at, http://miss.wu-wien.ac.at/~mottl




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-11-23 14:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-11-21 19:39 Bug in memory.h in ocaml 2.03? miles
1999-11-22 18:53 ` Markus Mottl

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).