On Jul 11, 2004, at 20:58, Andy Yang wrote:
> value zchaff_InitManager(void)
> {
> CAMLparam0();
> CAMLlocal1(val);
> void* solver = SAT_InitManager();
> val = copy_int32((int)solver);
> cout<<"solver = "<> CAMLreturn ( val );
> }
>
> void zchaff_ReadCnf(value mng, value filename)
> {
> CAMLparam2(mng, filename);
> SAT_Manager solver = (void*)Int32_val(mng);
> cout<<"solver = "<> assert(solver != NULL);
> char * fn = String_val(filename);
> cout<<"file = "<> read_cnf(solver, fn);
> CAMLreturn0;
> }
This code looks OK. How did you declare these two functions on
the OCaml side of things?
> Thus I should follows ocaml's Tag rules. However, the
> ! problem still exists. Tracing with gdb, I noticed that
> the toplevel still crashes in function obj_tag.
Sounds like the toplevel is trying to pretty-print one of your
values.
-- Damien
-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs