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 OAA12861; Fri, 27 Jun 2003 14:53:29 +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 OAA13056 for ; Fri, 27 Jun 2003 14:53:27 +0200 (MET DST) Received: from mail.speakeasy.net (mail11.speakeasy.net [216.254.0.211]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h5RCrQj29554 for ; Fri, 27 Jun 2003 14:53:26 +0200 (MET DST) Received: (qmail 23404 invoked from network); 27 Jun 2003 12:53:25 -0000 Received: from unknown (HELO apprentice.genxnet.com) ([64.81.145.152]) (envelope-sender ) by mail11.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 27 Jun 2003 12:53:25 -0000 Date: Fri, 27 Jun 2003 07:57:13 -0500 From: art yerkes To: Mikhail Fedotov Cc: Jean-Baptiste.Rouquier@inrialpes.fr, caml-list@inria.fr Subject: Re: Re[2]: [Caml-list] interfacing C and OCaml Message-Id: <20030627075713.5791e800.ayerkes@on-demand-tech.com> In-Reply-To: <21255847.20030627125956@kittown.com> References: <003001c33c17$343a0d80$355afac1@zofo> <54997465.20030627092459@kittown.com> <015e01c33c86$e06b79d0$7115c7c2@inrialpes.fr> <21255847.20030627125956@kittown.com> X-Mailer: Sylpheed version 0.8.11 (GTK+ 1.2.10; i686-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; yerkes:01 ayerkes:01 caml-list:01 interfacing:01 lacks:01 camlprim:01 camlextern:01 dlls:01 alloc:01 aged:99 ocaml:01 caml:01 collector:02 string:03 heap:03 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > Sorry, I've made a mistake myself. I've been talking mostly about "void" vs "value" > issue in your examples, but this is already addressed in the manual by stating that > the primitive function must return value. The documentation lacks introduction into > the macroses "CAMLprim", "CAMLextern" etc, but they are not strictly required now > if you are not dealing with Windows DLLs. In my experience, it's completely safe to use the macros no matter where the code is called from. You can omit them only when that would be safe, (i.e. you don't allocate anything into the caml heap). You can get away with not being nice to the GC only when you don't do anything that can trigger the collector. This means that if you do any alloc, alloc_tuple, copy_string, etc., then you must use them. It's not only for windows DLLs. -- `No, you don't understand,' the Knight said, looking a little vexed. `That's what the name is called. The name really is "The Aged Aged Man."' -- Lewis Carroll ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners