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 mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 83E09BC57 for ; Wed, 18 Aug 2010 19:28:08 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnEFAMa0a0xKfVK0kGdsb2JhbACTBiuNEggVAQEBAQkJDAcRAx+mB4sqhlYjiF8BAQMFhTIEiW2IOw X-IronPort-AV: E=Sophos;i="4.56,228,1280700000"; d="scan'208";a="57510139" Received: from mail-wy0-f180.google.com ([74.125.82.180]) by mail2-smtp-roc.national.inria.fr with ESMTP; 18 Aug 2010 19:28:08 +0200 Received: by wya21 with SMTP id 21so1161368wya.39 for ; Wed, 18 Aug 2010 10:28:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received:date :x-google-sender-auth:message-id:subject:from:to:content-type; bh=gic6HHy/dZWouXDgjPUSGOcNJ8OGDc6/E2lw/K65uSM=; b=LAjBHmTnoUFn+0AA6LvX9znQc+FN5qsawO+Gz5UEoLclC62AxH6pObIZy5FxdoIGNz 1X8K6GLCjrQN0NcPEHgcvcP9ysP32zjm6w3T0/R2roK/tRmEbiPqWXUIPnBfkEPU/O5h 8SZC3JwLIyb9jrCjSn8cdJvB/nGAsK//Pp5oc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=YoV9j32WTF8XDncLaoRHSE1Q4jzvshe57NudoGrM4OxD+9Nx9YJmBeF92UJfOvDN/6 ikmxvYZOlwFCsPpU05G1VnqpoXD5geuC7Zdn4aXLVQ4hY9KfuYvqxaLqJVyyxHhXbUrD MttiNdzuo/E7y5HQ3yrHeZs/SioIwoBcdgsMw= MIME-Version: 1.0 Received: by 10.216.45.83 with SMTP id o61mr2266641web.79.1282152487976; Wed, 18 Aug 2010 10:28:07 -0700 (PDT) Sender: jianzhou.zh@gmail.com Received: by 10.216.29.67 with HTTP; Wed, 18 Aug 2010 10:28:07 -0700 (PDT) Date: Wed, 18 Aug 2010 13:28:07 -0400 X-Google-Sender-Auth: 2rtGXYAXIGiT4EGyqXdsHFufKng Message-ID: Subject: OCaml Int64 <-> C int64_t From: Jianzhou Zhao To: caml-list@yquem.inria.fr Content-Type: text/plain; charset=ISO-8859-1 X-Spam: no; 0.00; ocaml:01 ocaml:01 val:01 byterun:01 byterun:01 mlvalues:01 zhao:98 upenn:01 integer:01 defines:01 ints:01 int:01 int:01 caml:02 seems:03 Hi, To convert between OCaml Int64 and C Integer, I think uint64_t or int64_t can be the target C type. Int64_val is the macro converting OCaml value to int64, I failed to find the macro for the other direction under ./byterun. ./byterun/ints.c defines operations on int64, caml_copy_int64(I64_of_intnat(..)) seems to be working for such conversion? But mlvalues.h does not declare them to use. How can I convert int64 to value? Thanks -- Jianzhou