From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Delivered-To: caml-list@yquem.inria.fr Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by yquem.inria.fr (Postfix) with ESMTP id B5F5DBC88 for ; Thu, 3 Feb 2005 12:16:57 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j13BGvbD021807 for ; Thu, 3 Feb 2005 12:16:57 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id MAA00777 for ; Thu, 3 Feb 2005 12:16:56 +0100 (MET) Received: from cradle.home.net (chowdhury95.demon.co.uk [80.177.9.225]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id j13BGuvM021803 for ; Thu, 3 Feb 2005 12:16:56 +0100 Received: from ucacruc by cradle.home.net with local (Exim 4.34) id 1Cwf73-0000TP-Tb; Thu, 03 Feb 2005 11:25:29 +0000 Date: Thu, 3 Feb 2005 11:25:29 +0000 From: ronniec95@lineone.net To: Daniel B?nzli Cc: caml-list@inria.fr Subject: Re: [Caml-list] GC with C issues Message-ID: <20050203112529.GA1820@cradle> References: <20050203105826.GA1669@cradle> <1a2eef762273f70a3d436af471a1c70a@epfl.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1a2eef762273f70a3d436af471a1c70a@epfl.ch> User-Agent: Mutt/1.4.2i Sender: X-Miltered: at nez-perce with ID 42020829.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 42020828.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; lineone:01 caml-list:01 wrote:01 camlparam:01 camlreturn:01 val:01 ....:98 ...:98 callbacks:01 strings:01 functions:01 macros:01 caml:02 objective:02 string:03 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on yquem.inria.fr X-Spam-Status: No, score=0.7 required=5.0 tests=FORGED_RCVD_HELO, FROM_ENDS_IN_NUMS,NO_REAL_NAME autolearn=disabled version=3.0.2 X-Spam-Level: Thank you, that did the trick. Yeah I know about the strcpy issue....but I chose to ignore it in this test program. In this particular case, the objective is to help me be comfortable with callbacks and the GC which is not quite working as yet... Ronnie On Thu, Feb 03, 2005 at 12:06:03PM +0100, Daniel B?nzli wrote: > When you use CAMLparam and CAMLlocal macros you must return from your C > functions with CAMLreturn. > > Also, beware of your use of strcpy with String_val(aString) according > to the documention caml strings can contain embedded null characters. > > Daniel