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=0.0 required=5.0 tests=AWL autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id E18FCBC6C for ; Thu, 17 Jan 2008 23:26:35 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAAJlj0fAbSoIh2dsb2JhbACQFwEBAQgKKYEUnCk X-IronPort-AV: E=Sophos;i="4.24,304,1196636400"; d="scan'208";a="21443763" Received: from einhorn.in-berlin.de ([192.109.42.8]) by mail4-smtp-sop.national.inria.fr with ESMTP; 17 Jan 2008 23:26:35 +0100 X-Envelope-From: oliver@first.in-berlin.de X-Envelope-To: Received: from einhorn.in-berlin.de (localhost [127.0.0.1]) by einhorn.in-berlin.de (8.13.6/8.13.6/Debian-1) with ESMTP id m0HMQYH2010709 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Thu, 17 Jan 2008 23:26:35 +0100 Received: (from www-data@localhost) by einhorn.in-berlin.de (8.13.6/8.13.6/Submit) id m0HMQY3T010707 for caml-list@yquem.inria.fr; Thu, 17 Jan 2008 23:26:34 +0100 X-Authentication-Warning: einhorn.in-berlin.de: www-data set sender to oliver@first.in-berlin.de using -f Received: from dslb-088-073-099-097.pools.arcor-ip.net (dslb-088-073-099-097.pools.arcor-ip.net [88.73.99.97]) by webmail.in-berlin.de (IMP) with HTTP for ; Thu, 17 Jan 2008 23:26:34 +0100 Message-ID: <1200608794.478fd61aabcb5@webmail.in-berlin.de> Date: Thu, 17 Jan 2008 23:26:34 +0100 From: Oliver Bandel To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] Give back a Pair from C to OCaml? References: <1200583973.478f7525e7a5a@webmail.in-berlin.de> <200801172143.55407.fmonnier@linux-nantes.fr.eu.org> In-Reply-To: <200801172143.55407.fmonnier@linux-nantes.fr.eu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit User-Agent: Internet Messaging Program (IMP) 3.2.6 X-Scanned-By: MIMEDefang_at_IN-Berlin_e.V. on 192.109.42.8 X-Spam: no; 0.00; bandel:01 in-berlin:01 ocaml:01 int's:01 ocaml:01 wosize:01 wosize:01 val:01 int-:01 oliver:01 oliver:01 caml-list:01 pair:01 pair:01 usefull:02 hello Florent, Zitat von Florent Monnier : > > how can I give back a pair of values (in my case both are > > int's) from C to OCaml? > > > > Didn't found something in the docs so far. > Hi, > Recently I've written a small tutorial about wrapping ocaml to C, > maybe you could find it usefull: > http://www.linux-nantes.org/~fmonnier/OCaml/ocaml-wrapping-c.php [...] You mentioned a "Double_wosize" in your tutorial, but I can't find such a thing in the reference manual. So, there seems to be something different.... Possibly you mean something like Wosize_val(Double_field(ml_array, 0)) ??? Would that work? Does int- and floats really need such a distinction?! Ciao, Oliver