> GObject provides something called "closures" and "marshallers" for that
> exact purpose. I had some problems when they where called from another
> thread, which might be unrelated. In principle, it works:

Please be careful when storing values that they don't get garbaged or
you might get crashes. For instance :

a) DO NOT store values in a malloc'ated block

b) store them either in the "data" part of an "abstract" or in an block
allocated with "alloc_root" (and don't forget "free_root")

c) most of the time, you will use the following :

struct my_struct {
    value a;
    value b;
    my_object *obj;
};

and alloc "my_struct" with neko "alloc", and store it into the "data"
part of an abstract.

Nicolas


-- 
Neko : One VM to run them all
(http://nekovm.org)

Reply via email to