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 BAA24029; Wed, 7 Mar 2001 01:43:59 +0100 (MET) 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 BAA24148 for ; Wed, 7 Mar 2001 01:43:58 +0100 (MET) Received: from smtp5-cm.mail.eni.net (smtp5-cm.mail.eni.net [216.133.226.138]) by nez-perce.inria.fr (8.11.1/8.10.0) with ESMTP id f270hvD28339 for ; Wed, 7 Mar 2001 01:43:57 +0100 (MET) Received: from checkerlap.d6.com (node-d8e9cca2.powerinter.net [216.233.204.162]) by smtp5-cm.mail.eni.net (8.9.3/8.9.3) with ESMTP id QAA14633; Tue, 6 Mar 2001 16:43:49 -0800 Message-Id: <4.3.2.7.2.20010306163224.036498f0@shell16.ba.best.com> X-Sender: def6@shell16.ba.best.com X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Tue, 06 Mar 2001 16:44:06 -0800 To: qrczak@knm.org.pl (Marcin 'Qrczak' Kowalczyk), caml-list@inria.fr From: Chris Hecker Subject: Re: [Caml-list] create a closure in external C function? In-Reply-To: References: <4.3.2.7.2.20010306011427.03669de0@shell16.ba.best.com> <20010306180128.B12522@pauillac.inria.fr> <4.3.2.7.2.20010306111106.0372b7d0@shell16.ba.best.com> <4.3.2.7.2.20010306140915.03782b00@shell16.ba.best.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk >trampoline+vacall is evil. It uses a global variable; this is not >thread safe. Yeah, I was going to look at that closer to see if there's any way to make it thread safe. It seems a shame to have all of that cross platform work done and then shove the thing in a global... > Especially if you statically know types of arguments, >which is the case I am talking about. Which case are you talking about? Are you working on this as well? Are you just talking about wanting to expose qsort and other functions that take callbacks? > I would like to have this functionality in OCaml's foreign function >interface, without forcing to rely on an inconvenient third-party >package. That would be great, but I'm not sure if anybody's working on this at INRIA. Heck, we might as well do a proof of concept first before they waste their time on it anyway, and then if it's useful we'll see about making it more official. If it was built into the compiler it could be made super-clean, basically like external is now...I can see it now...extern[al] "C"! My original plan wasn't to do the whole thing, it was just to get wglGetProcAddress (and the glx version) working for OpenGL for a library Kipton Barros and I are going to be working on, and then I realized that if I got that working it wouldn't be much harder to just generalize it to GetProcAddress/dlsym, which would have the potential to be hugely useful for all caml programmers, not just OpenGL programmers. So, I'll probably just do that, assuming it turns out to be possible. Chris ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr