Browse thread
[Caml-list] Ocaml -> C -> Ocaml callback problem
-
Lars Nilsson
-
Olivier Andrieu
- Lars Nilsson
-
Olivier Andrieu
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Lars Nilsson <lars@c...> |
| Subject: | Re: [Caml-list] Ocaml -> C -> Ocaml callback problem |
Thank you Olivier,
That seemed to solve my problem. Much appreciated. Now on to the real
deal.
Regards,
Lars Nilsson
Olivier Andrieu writes:
> 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