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 24BAABB9C for ; Wed, 18 Jan 2006 22:31:09 +0100 (CET) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.184]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id k0ILV830004545 for ; Wed, 18 Jan 2006 22:31:08 +0100 Received: from [212.227.126.160] (helo=mrelayng.kundenserver.de) by moutng.kundenserver.de with esmtp (Exim 3.35 #1) id 1EzKtU-0006tt-00; Wed, 18 Jan 2006 22:31:04 +0100 Received: from [84.58.141.8] (helo=gate.lan.gerd-stolpmann.de) by mrelayng.kundenserver.de with asmtp (Exim 3.35 #1) id 1EzKtU-0004PK-00; Wed, 18 Jan 2006 22:31:04 +0100 Received: from flakew.lan.gerd-stolpmann.de (flakew.lan.gerd-stolpmann.de [192.168.0.32]) by gate.lan.gerd-stolpmann.de (Postfix) with ESMTP id C3D9CC177; Wed, 18 Jan 2006 22:31:03 +0100 (CET) Subject: Re: [Caml-list] C interface style question From: Gerd Stolpmann To: Florent Monnier Cc: caml-list@yquem.inria.fr In-Reply-To: <200601182132.45196.fmonnier@linux-nantes.fr.eu.org> References: <1137611897.11593.103.camel@localhost.localdomain> <200601182132.45196.fmonnier@linux-nantes.fr.eu.org> Content-Type: text/plain Date: Wed, 18 Jan 2006 22:31:03 +0100 Message-Id: <1137619863.11593.107.camel@localhost.localdomain> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 Content-Transfer-Encoding: 7bit X-Provags-ID: kundenserver.de abuse@kundenserver.de auth:a6865a839c0178d9aa0ce41878507ea2 X-Miltered: at concorde with ID 43CEB39C.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 gerd:01 stolpmann:01 ocaml:01 pointers:01 bool:01 o'caml:01 camlreturn:01 camlparam:01 gerd:01 stolpmann:01 viktoriastr:01 64293:01 darmstadt:01 compile:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.1 required=5.0 tests=FORGED_RCVD_HELO autolearn=disabled version=3.0.3 Am Mittwoch, den 18.01.2006, 21:32 +0100 schrieb Florent Monnier: > > > 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 ? That would not even compile without a CAMLparam. Gerd -- ------------------------------------------------------------ Gerd Stolpmann * Viktoriastr. 45 * 64293 Darmstadt * Germany gerd@gerd-stolpmann.de http://www.gerd-stolpmann.de Telefon: 06151/153855 Telefax: 06151/997714 ------------------------------------------------------------