Version française
Home     About     Download     Resources     Contact us    
Browse thread
[Caml-list] Ocaml -> C -> Ocaml callback problem
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Olivier Andrieu <andrieu@i...>
Subject: Re: [Caml-list] Ocaml -> C -> Ocaml callback problem
You're using CAMLparam macros to register the arguments in the GC but
then you're not using CAMLreturn.

 > CAMLprim value helper_doit()
 > {
 >      CAMLparam0();
 > 
 >      callback2(closure_fun, copy_string("foo"), closure_data);
 > 
        CAMLreturn(Val_unit);

 > }

(same thing for the other function).

-- 
   Olivier
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners