Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
[Caml-list] camlidl and pointer to function
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2001-11-13 (18:13)
From: Dmitry Bely <dbely@m...>
Subject: [Caml-list] camlidl and pointer to function
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,

Bug reports:  FAQ:
To unsubscribe, mail  Archives: