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 LAA32152; Wed, 12 Jun 2002 11:53:15 +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 LAA32158 for ; Wed, 12 Jun 2002 11:53:14 +0200 (MET DST) Received: from beaune.inria.fr (beaune.inria.fr [128.93.8.3]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g5C9rEj27845 for ; Wed, 12 Jun 2002 11:53:14 +0200 (MET DST) Received: by beaune.inria.fr (8.8.8/1.1.22.3/14Sep99-0328PM) id LAA0000032113; Wed, 12 Jun 2002 11:53:13 +0200 (MET DST) Date: Wed, 12 Jun 2002 11:53:13 +0200 (MET DST) From: Damien Doligez Message-Id: <200206120953.LAA0000032113@beaune.inria.fr> To: garrigue@kurims.kyoto-u.ac.jp, max630@mail.ru Subject: Re: [Caml-list] Unix.file_descr -> int ??? Cc: caml-list@inria.fr Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >From: Jacques Garrigue >Windows version: > >let dump_handle (h : Unix.file_descr) = > let obj = Obj.repr h in > if Obj.is_block obj && Obj.tag obj = Obj.custom_tag then > Nativeint.format "%x" (Obj.obj obj) > else invalid_arg "dump_handle" This does not work. You are printing the address of the custom block that contains the handle, but this address can change during program execution. -- Damien ------------------- 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