From: Axel Simon <Axel.S<imon@in...> - 2011-06-07 06:19:12
On 07.06.2011, at 03:29, Gabriel Gonzalez wrote:
> Sorry for the long delay, but I finally got around to testing your
> suggestion. When I compile glib with closure_signals disabled and
> rebuild everything up to gtk2hs, I get a compile-time error when
> using the library:
> In function `sadU_info':
> (.text+0x5b8): undefined reference to `gtk2hs_closure_new'
> collect2: ld returned 1 exit status
> But with the closure_signals flag enabled everything works swimmingly.
There are two ways of handling signals. With closure_signals set, the
implementation is a bit more efficient but at the time it was not
available on all platforms. So somehow you removed the
gtk2hs_closure_new function (or did we?).
> I haven't yet tested signal handlers that return integers because
> I'm still new to gtk in general and I'm not yet familiar with the
> gtk functions that use integer return values and what effect they
> have. However, signal handlers with boolean return values (like
> deleteEvent) still work and interpret the return value correctly.
> Is there any particular reason you were interested in testing
Well, any return value would do. I though integers would be the
easiest. If your solution works with both, closure_signals and
without, then I'm happy to apply it.
> On 05/01/2011 02:50 AM, Axel Simon wrote:
>> Hi Gabriel,
>> sorry about not reading the Trac page, I should do that more often...
>> On 01.05.11 00:32, Gabriel Gonzalez wrote:
>>> I made a patched version of gtk2hs substituting in rts_evalLazyIO
>>> bug page for details) instead and this fixed the problem.
>>> However, I
>>> don't know if this is an ideal solution since maybe it might lead to
>>> space leaks. I was hoping you guys could comment on whether or
>>> not it's
>>> important to use the stricter rts_evalIO.
>> Yes, that seems reasonable. Does this affect the way non-void
>> values are
>> returned? I.e. if they are thunks and only evaluated lazily, is
>> there a
>> chance that the C code in hsgclosure.c will bail? Can you check if
>> returning integers from a signal handler still works? (Both with the
>> flag closure_signals set and reset when you do a cabal configure.)
>> WhatsUp Gold - Download Free Network Management Software
>> The most intuitive, comprehensive, and cost-effective network
>> management toolset available today. Delivers lowest initial
>> acquisition cost and overall TCO of any competing solution.
>> Gtk2hs-devel mailing list