From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.6.10/8.6.6) id SAA01926 for caml-redistribution; Tue, 24 Sep 1996 18:42:08 +0200 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.6.10/8.6.6) with ESMTP id QAA29160 for ; Tue, 24 Sep 1996 16:58:22 +0200 Received: from dc.fi.udc.es (finisterrae.dc.fi.udc.es [193.144.51.10]) by concorde.inria.fr (8.7.6/8.7.1) with SMTP id QAA14554 for ; Tue, 24 Sep 1996 16:58:18 +0200 (MET DST) Received: by dc.fi.udc.es (5.0/SMI-SVR4) id AA10783; Tue, 24 Sep 1996 16:45:20 +0200 Date: Tue, 24 Sep 1996 16:45:20 +0200 From: quintela@finisterrae.dc.fi.udc.es (Juan Jose Quintela Carreira) Message-Id: <9609241445.AA10783@dc.fi.udc.es> To: caml-list@pauillac.inria.fr, christo@nextsolution.co.jp Subject: Re: Need help: O'Caml C Interface X-Sun-Charset: US-ASCII Sender: weis Hi, If you changes the lines: > > value ocaml_getCharWidth(value code) > { > double x, y; > Push_roots(r,1); > > r[0] = alloc_tuple(2); > getCharWidth(Int_val(code),&x,&y); - Store_double_val(Field(r[0],0),x); + modify(&Field(r[0],0),copy_double(x); /* Field(r[0],0)=copy_double(x)*/ - Store_double_val(Field(r[0],1),y); + modify(&Field(r[0],1),copy_double(y); /* Field(r[0],1)=copy_double(y)*/ > Pop_roots(); > return r[0]; > } > The coment sentences also work in this example, but the former work always, For details see the manual section: Chapter: Interfacing C with Objective Caml Section: Living in harmony with the garbage collector Regards, Juan.