Le 07/09/2010 22:58, Paolo Donadeo a écrit : > I'm writing a Lua API binding > [...] > typedef struct ocaml_data > { > value state_value; > value panic_callback; > } ocaml_data; > [...] > /* alloc space for the register entry */ > ocaml_data *data = (ocaml_data*)caml_stat_alloc(sizeof(ocaml_data)); > caml_register_global_root(&(data->panic_callback)); > data->panic_callback = *default_panic_v;
Why don't you call caml_register_global_root on &(data->state_value) as well? -- Stéphane _______________________________________________ Caml-list mailing list. Subscription management: http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list Archives: http://caml.inria.fr Beginner's list: http://groups.yahoo.com/group/ocaml_beginners Bug reports: http://caml.inria.fr/bin/caml-bugs