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=none autolearn=disabled version=3.1.3 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 D2FB4BC0A for ; Thu, 21 Dec 2006 20:44:25 +0100 (CET) Received: from mail.corp.idt.net (mail.corp.idt.net [169.132.25.53]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id kBLJiOLx001441 for ; Thu, 21 Dec 2006 20:44:25 +0100 Received: from [169.132.9.113] (account saleyn HELO [169.132.9.113]) by mail.corp.idt.net (CommuniGate Pro SMTP 4.2.10) with ESMTP id 192949553 for caml-list@inria.fr; Thu, 21 Dec 2006 14:44:22 -0500 Message-ID: <458AE416.9090405@hq.idt.net> Date: Thu, 21 Dec 2006 14:44:22 -0500 From: Serge Aleynikov User-Agent: Thunderbird 1.5.0.9 (Windows/20061207) MIME-Version: 1.0 To: caml-list@inria.fr Subject: Re: [Caml-list] big_int References: <458AE26F.8080802@hq.idt.net> In-Reply-To: <458AE26F.8080802@hq.idt.net> Content-Type: text/plain; charset=windows-1251; format=flowed Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 458AE418.002 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; nat:01 stubs:01 ocaml:01 ocaml:01 int's:01 wrote:01 encode:01 integer:01 caml-list:01 macros:01 int:01 int:01 gmp:02 caml:02 module:03 Sorry for extra noise - I found what I needed in the nat_stubs.c of the numeric library that comes in the sources of distribution. Serge Serge Aleynikov wrote: > Greetings! > > I'm trying to figure out how to pass a big integer (encoded using GMP > library) from C to OCaml so that it could be read on the OCaml side > using Big_int module. The interoperability macros listed in the manual > (http://caml.inria.fr/pub/docs/manual-ocaml/manual032.html) and in the > interoperability header files don't seem to have anything applicable for > Big_int's. > > Could someone point me to an example or resource of how to encode/decode > a Big_int from/to C? > > Thanks. > > Serge > -- Serge Aleynikov Routing R&D, IDT Telecom Tel: +1 (973) 438-3436 Fax: +1 (973) 438-1464