From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id F2E32BB9C for ; Wed, 18 Jan 2006 21:24:19 +0100 (CET) Received: from mail.libertysurf.net (mx-out.libertysurf.net [213.36.80.91]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k0IKOHh2029022 for ; Wed, 18 Jan 2006 21:24:19 +0100 Received: from dyn-83-152-21-40.ppp.tiscali.fr (83.152.21.40) by mail.libertysurf.net (7.1.026) id 439E8311005E0C1F for caml-list@yquem.inria.fr; Wed, 18 Jan 2006 21:24:17 +0100 From: Florent Monnier Organization: l'Association Linux-Nantes To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] C interface style question Date: Wed, 18 Jan 2006 21:32:45 +0100 User-Agent: KMail/1.8.2 References: <1137611897.11593.103.camel@localhost.localdomain> In-Reply-To: <1137611897.11593.103.camel@localhost.localdomain> X-Face: "`cRNH1ww*pA7BMG\%C8RcGZR33F%q#d~:5U8b[K-NbYLSW_wpx@wk**lzqX3\F'a|gyP"K /emS.&rsSu'a7OiJH&d?,Z6OxW_L}I"z%\><#5LL%uQXl"QY@~9|XyM7{`tAq?Gp@ul&F'# MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200601182132.45196.fmonnier@linux-nantes.fr.eu.org> X-Miltered: at concorde with ID 43CEA3F1.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 ocaml:01 pointers:01 bool:01 o'caml:01 camlreturn:01 functions:01 int:01 parameters:02 parameters:02 exported:04 interface:05 style:93 allocate:06 memory:08 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 > > value-type parameters to C functions exported to OCaml should be > > registered with CAMLparamX(...). Does this hold in general, or is it > > considered acceptable/appropriate to just ignore this for "immediate" > > values that do not hold pointers, but, say, int, bool etc. values? > > If you don't allocate O'Caml memory you need not to register the > parameters. And in this case there's no need to use CAMLreturn(), return is enough, is it right ? --