From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id CAA03019; Wed, 22 Sep 2004 02:26:54 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 CAA02803 for ; Wed, 22 Sep 2004 02:26:52 +0200 (MET DST) Received: from mail.davidb.org (adsl-64-172-240-129.dsl.sndg02.pacbell.net [64.172.240.129]) by nez-perce.inria.fr (8.13.0/8.13.0) with ESMTP id i8M0QmZ2011594 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 22 Sep 2004 02:26:52 +0200 Received: from davidb by mail.davidb.org with local-bsmtp (Exim 4.41 #1 (Debian)) id 1C9uxz-0006G5-Pj; Tue, 21 Sep 2004 17:26:39 -0700 Date: Tue, 21 Sep 2004 18:14:19 -0600 From: David Brown To: Jeremy Cowgar Cc: OCaml Mailing List Subject: Re: [Caml-list] Returning a file handle from C (fopen) Message-ID: <20040922001419.GA24756@tg4.local> References: <87k6un5lb7.fsf@jhome.cowgar.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87k6un5lb7.fsf@jhome.cowgar.com> User-Agent: Mutt/1.4.2.1i X-Miltered: at nez-perce with ID 4150C6C8.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 caml-list:01 2004:99 0400,:01 val:01 val:01 jeremy:01 ocaml:01 ocaml:01 sep:01 unix:02 dave:03 wrote:03 descr:05 channel:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, Sep 21, 2004 at 06:06:20PM -0400, Jeremy Cowgar wrote: > Greetings, > > I am trying to return a file handle from C. A simple Val_long does not > work, so I did some research and found something like the following: You could just return the Val_long, and use Unix.out_channel_of_descr in the ocaml world to get an ocaml channel. Dave ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners