From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p9FBMTCM010846 for ; Sat, 15 Oct 2011 13:22:29 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkMBAE1smU7RVdi2imdsb2JhbABDqF0IIgEBAQoJDQcSBiGBZQkBAQEDAQwGAiwBGx0BAwELBgUDAQc7IgERAQUBHAYTIoddmU8Ki1GCYIRePYhuAgUKh3oEh3yEcIcOjSo9g3Q X-IronPort-AV: E=Sophos;i="4.69,350,1315173600"; d="scan'208";a="124242969" Received: from mail-qy0-f182.google.com ([209.85.216.182]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 15 Oct 2011 13:22:23 +0200 Received: by qyg14 with SMTP id 14so1149486qyg.6 for ; Sat, 15 Oct 2011 04:22:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=qFTY42ldqLnHpHkc7j5PrrXb0JY4TE5GDDAlQqp9/fc=; b=oNF87vSyh77370KWVTBIDAxAjvAj2Qw9eFDOl8KIDvHhYYdP1f0MAIal9DwGZg2b9T m33bH7H75BFG/l/+jh904xWQ6xlPmh7BindA83lXU7kbZGNC6Mkw4E5MkAWQNuTryARI s0gLPuLCbsxsj3d9UeT6388NP9zEiVKVInW8E= MIME-Version: 1.0 Received: by 10.229.69.212 with SMTP id a20mr2716052qcj.97.1318677743022; Sat, 15 Oct 2011 04:22:23 -0700 (PDT) Received: by 10.229.95.198 with HTTP; Sat, 15 Oct 2011 04:22:22 -0700 (PDT) In-Reply-To: <1318671867.21057.84.camel@aurora> References: <1318671867.21057.84.camel@aurora> Date: Sat, 15 Oct 2011 15:22:22 +0400 Message-ID: From: Kakadu To: =?ISO-8859-1?Q?J=E9r=E9mie_Dimino?= Cc: Caml List Content-Type: multipart/alternative; boundary=0016e65060667231e404af54969c Subject: Re: [Caml-list] [C] call Caml method --0016e65060667231e404af54969c Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable O_O I want to install OCaml type-checker into my mind! Thanks, J=E9r=E9mie! On Sat, Oct 15, 2011 at 1:44 PM, J=E9r=E9mie Dimino wr= ote: > Hi, > > Le samedi 15 octobre 2011 =E0 13:30 +0400, Kakadu a =E9crit : > > arg1 =3D Val_int(1); > > // caml_callback2(meth, obj, arg1); // segfault in this line > > In your example arg1 should be a string, here it is an int. And the > commented line is the right way to call the method. > > Cheers, > > -- > J=E9r=E9mie > > > --0016e65060667231e404af54969c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable O_O
I want to install OCaml type-checker into my mind!

Thanks, J= =E9r=E9mie!

On Sat, Oct 15, 2011 at 1:44 = PM, J=E9r=E9mie Dimino <jeremie@dimino.org> wrote:
Hi,

Le samedi 15 octobre 2011 =E0 13:30 +0400, Kakadu a =E9crit :
> =A0 arg1 =3D Val_int(1);
> // =A0caml_callback2(meth, obj, arg1); // segfault in this line

In your example arg1 should be a string, here it is an int. And the commented line is the right way to call the method.

Cheers,

--
J=E9r=E9mie



--0016e65060667231e404af54969c--