English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Help interfacing with C
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2006-08-19 (08:59)
From: Olivier Andrieu <oandrieu@n...>
Subject: Re: [Caml-list] Re: Help interfacing with C
 Nathaniel Gray [Friday 18 August 2006] :
 > Now of course this could all be done at the ocaml level, but
 > wouldn't it be nicer to do the elegant thing in the first place
 > instead of cleaning up the mess afterwards?  ;^)

Erm, doing things on the C side isn't especially "elegant",
sorry. It's way more error-prone, more complicated to compile/link
against, and in your case it's not even portable (your version is
Unix-only).

Just write your select2 using an intermediate Hashtbl: it probably
won't be much slower (unless you have hundreds of fd maybe). 

-- 
   Olivier