caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] camlidl and pointer to function
@ 2001-11-13 17:43 Dmitry Bely
  2001-11-14  9:52 ` NASSOR Eric
  0 siblings, 1 reply; 9+ messages in thread
From: Dmitry Bely @ 2001-11-13 17:43 UTC (permalink / raw)
  To: caml-list

I have a C library function with interface like following:

typedef [abstract] void* SomeType;
typedef int (*CallBack)(int);
void convert( SomeType* in, SomeType* out, CallBack c);

It would be nice to use it in caml the following way:

external convert: someType->someType->(int->int)->unit = "something"
...
convert stIn stOut ((+) 1)
...

Unfortinately CamIDL language does not allow the pointer to function as a
valid type, but maybe there is some common solution/workaround for this
problem? Or the only way is writing necessary stubs and conversion
functions by hands? Is is possible at all?

Hope to hear from you soon,
Dmitry


-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 9+ messages in thread
* RE: [Caml-list] camlidl and pointer to function
@ 2001-11-14 20:43 Krishnaswami, Neel
  2001-11-15  8:23 ` Dmitry Bely
  0 siblings, 1 reply; 9+ messages in thread
From: Krishnaswami, Neel @ 2001-11-14 20:43 UTC (permalink / raw)
  To: 'caml-list@inria.fr'

Dmitry Bely [mailto:dbely@mail.ru] wrote:
> > 
> > I've once seen a C library which tries to provide it for several
> > platforms but I forgot its name.
> 
> It would be nice if you recall it :-)

Is this it?

http://users.n.ml.org/nc/ffcall/callback.html

--
Neel Krishnaswami
neelk@cswcasa.com
 
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs  FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr  Archives: http://caml.inria.fr


^ permalink raw reply	[flat|nested] 9+ messages in thread
[parent not found: <9sul5k$ga4$1@qrnik.zagroda>]

end of thread, other threads:[~2001-11-15  8:25 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-11-13 17:43 [Caml-list] camlidl and pointer to function Dmitry Bely
2001-11-14  9:52 ` NASSOR Eric
2001-11-14 12:16   ` Dmitry Bely
     [not found]   ` <9stni6$hh6$1@qrnik.zagroda>
2001-11-14 14:56     ` Marcin 'Qrczak' Kowalczyk
2001-11-14 16:02       ` Dmitry Bely
2001-11-14 20:21         ` Dmitry Bely
2001-11-14 20:43 Krishnaswami, Neel
2001-11-15  8:23 ` Dmitry Bely
     [not found] <9sul5k$ga4$1@qrnik.zagroda>
2001-11-14 21:24 ` Marcin 'Qrczak' Kowalczyk

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).