From: Dave Benjamin <dave@ramenlabs.com>
To: Robert Fischer <robert.fischer@smokejumperit.com>
Cc: caml-list <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] file_desc
Date: Tue, 01 Jul 2008 08:15:48 -0700 [thread overview]
Message-ID: <486A4A24.2060900@ramenlabs.com> (raw)
In-Reply-To: <486A40C9.2020807@smokejumperit.com>
Robert Fischer wrote:
> Is there a way to convert a file_descr to/from an int in OCaml? The type is abstract, and there
> doesn't seem to be an obvious answer.
If you don't want to use Obj.magic, there is also the Netsys module from
Ocamlnet, which defines these two functions as C extensions:
val int_of_file_descr : Unix.file_descr -> int
val file_descr_of_int : int -> Unix.file_descr
Dave
prev parent reply other threads:[~2008-07-01 15:15 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-01 14:35 file_desc Robert Fischer
2008-07-01 14:56 ` [Caml-list] file_desc SerP
2008-07-01 14:59 ` Mark Shinwell
2008-07-01 15:15 ` Dave Benjamin [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=486A4A24.2060900@ramenlabs.com \
--to=dave@ramenlabs.com \
--cc=caml-list@yquem.inria.fr \
--cc=robert.fischer@smokejumperit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox