From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.4 required=5.0 tests=SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id DEFD6BC0A for ; Fri, 16 Feb 2007 17:20:50 +0100 (CET) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.226]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l1GGKmZf030018 for ; Fri, 16 Feb 2007 17:20:50 +0100 Received: by wr-out-0506.google.com with SMTP id i22so1071311wra for ; Fri, 16 Feb 2007 08:20:48 -0800 (PST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:reply-to:user-agent:mime-version:to:subject:references:in-reply-to:content-type:content-transfer-encoding:from; b=lCGY8a7eDYV243hlLYOQqSIkTuTgFaoz8QpTdHWaPcOYigPdZdDzjH6ANuO51n7fg6BykvKzAKtXOjZ1e1ycBV7Yd/QSUVDzo3rdp13eZ0ug7caBAaln57hUhDM1IZLaKgl1F/M8YEBfHjNfAlbj3b20IlqRJ8EMr0wPy4bPbGI= Received: by 10.90.102.20 with SMTP id z20mr4289685agb.1171642848099; Fri, 16 Feb 2007 08:20:48 -0800 (PST) Received: from ?192.168.1.10? ( [84.98.78.95]) by mx.google.com with ESMTP id j1sm4368340ugf.2007.02.16.08.20.46; Fri, 16 Feb 2007 08:20:47 -0800 (PST) Message-ID: <45D5D9DC.8050704@laposte.net> Date: Fri, 16 Feb 2007 17:20:44 +0100 Reply-To: matthieu.dubuget@laposte.net User-Agent: Thunderbird 1.5.0.9 (X11/20070103) MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] CAMLreturn does not work for floats between 0 and 1 ? References: <45D5C3AD.2000606@laposte.net> <98085E4A-B42B-4570-90DC-842ABA89F5D6@epfl.ch> In-Reply-To: <98085E4A-B42B-4570-90DC-842ABA89F5D6@epfl.ch> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit From: Matthieu Dubuget X-j-chkmail-Score: MSGID : 45D5D9E0.002 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 45D5D9E0.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; camlreturn:01 matthieu:01 dubuget:01 matthieu:01 dubuget:01 bunzli:01 camlreturn:01 camlparam:01 ocaml:01 ocaml:01 camlparam:01 46,:98 caml-list:01 functions:01 functions:01 Daniel Bünzli a écrit : > > Le 16 févr. 07 à 15:46, Matthieu Dubuget a écrit : > >> I'm sure I'm doing something bad. But I can't find out where? > > CAMLreturn and CAMLparam0 macros are used in functions that are called > from ocaml land and return a value in ocaml land. You should not use > them for your functions called in C land and returning a value in C > land (see section 18.7.2 of the manual). OK. Thanks. But this is not all clear for me. Suppose that I have to construct one or more value(s) to pass them to OCaml land. I do have to use CAMLlocal macros for that, don't I. Can use them without CAMLparam and CAMLreturn macros? Salutations Matt