Re: Marshalling CClosures



ERDI Gergo <cactus cactus rulez org> writes:
> I get the following error message:
> 
> (process:23945): GRuntime-CRITICAL **: file gclosure.c: line 420
> (g_closure_invoke): assertion `closure->marshal || closure->meta_marshal'
> failed
> 
> Looking at g_cclosure_new I indeed have no idea where the marshaller
> should be set for CClosures, so I guess the warning is right -- but
> how do I fix it?
> 

It looks like gsignal.c sets this. i.e. the marshaller is stored with
the signal, and when you connect the closure to a signal the signal
system sets the marshaller.

I wanted Tim to create a GHandlerList object that would make it easy
to do what you're trying to do - it would be a list of handlers, with
marshaller, etc., and have connect/disconnect/emit methods. Then we
could use it as the implementation guts for all
connect/disconnect/emit lists of handlers.  But I don't think he ever
understood what I meant by this idea.

What he argued you should do instead is always use the signal
system. So you are supposed to somehow have a signal there that you
connect the closure to - that is, all connect/disconnect/emit things
must be signals.

This still makes no sense to me, but perhaps you can ask him to
explain it, or maybe you can figure it out.

Havoc




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]