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.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 32ED0BC6C for ; Thu, 17 Jan 2008 16:43:13 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAFMGj0fAXQInh2dsb2JhbACQFwEBAQgKKYEUk2WIRw X-IronPort-AV: E=Sophos;i="4.24,301,1196636400"; d="scan'208";a="6232462" Received: from concorde.inria.fr ([192.93.2.39]) by mail2-smtp-roc.national.inria.fr with ESMTP; 17 Jan 2008 16:43:13 +0100 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m0HFhClM006857 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 17 Jan 2008 16:43:12 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAFMGj0dIDsq2i2dsb2JhbACQFwEBAQgCBgkKEQWBFpNliEc X-IronPort-AV: E=Sophos;i="4.24,301,1196636400"; d="scan'208";a="6854507" Received: from ro-out-1112.google.com ([72.14.202.182]) by mail1-smtp-roc.national.inria.fr with ESMTP; 17 Jan 2008 16:43:12 +0100 Received: by ro-out-1112.google.com with SMTP id m6so377851roe.13 for ; Thu, 17 Jan 2008 07:43:11 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=TPNs806Y5GmT0jYZmSKte1QLC3ix0p+ijuDXC6tvA5I=; b=Dao44vToMCyyx5jai6mmPbyg8PMZgZUrCMUgPpGdaiMVVSr7lQPkGoWuYGBhU/15QGCpNhvWUhde7/scxz/4vaKYXbOqoBVYjzhekmmbaHMZiSgugLzBySH6+wPDysCTe3XRCWkAxFcNo24RRxZVwGSinaI5/7rPBWatbKDt8lo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=OwXBF3qiIaOOZsD22tbQrhjpVzw7fH/6amDFmDFGeVyX8gOGKkK6YaWYldI+cMyjTMPJIwCHdbF9p+ivgIiPYtqlg0Q2QQOMJypbjcQ3HLs70iq8KuVjuwI8IqAbKqnJ/JR1fI7gUf9M4PUXJca2ZEjayhIiAwYi8uw3ejnhqeM= Received: by 10.142.231.7 with SMTP id d7mr1321213wfh.30.1200584589941; Thu, 17 Jan 2008 07:43:09 -0800 (PST) Received: by 10.142.115.3 with HTTP; Thu, 17 Jan 2008 07:43:09 -0800 (PST) Message-ID: <9d3ec8300801170743k509a7c4wa9d8f490118a9653@mail.gmail.com> Date: Thu, 17 Jan 2008 15:43:09 +0000 From: "Till Varoquaux" To: "Oliver Bandel" Subject: Re: [Caml-list] Give back a Pair from C to OCaml? Cc: caml-list@inria.fr In-Reply-To: <1200583973.478f7525e7a5a@webmail.in-berlin.de> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1200583973.478f7525e7a5a@webmail.in-berlin.de> X-Miltered: at concorde with ID 478F7790.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 pointers:01 ocaml:01 integers:01 cheers:01 bandel:01 in-berlin:01 int's:01 beginner's:01 bug:01 beginners:01 wrote:01 oliver:01 oliver:01 integer:01 from the manual: >>Tuples are represented by pointers to blocks, with tag 0. You have to create a block with two fields and put each integer in one of these fields (ocaml integers that is). I can't tell you exactly from the top of my head but I do rememenber it isn't really hard. Cheers, Till On Jan 17, 2008 3:32 PM, Oliver Bandel wrote: > Hello, > > 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. > > TIA, > Oliver > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs > -- http://till-varoquaux.blogspot.com/