On Tue, 08 Apr 2003 00:49, you wrote:
BTW, your call-out to C does not perform callbacks, right?
Yes it does. Here's the code I'm calling from Scheme.
void do_event(Display* display)
{
XEvent event;
int i = C_interrupts_enabled;
/* C_interrupts_enabled = 0; */
if(XPending(display))
{
XNextEvent(display, &event);
/* call_handle_event is a Scheme function. If an interrupt occurs
while in there the programs hangs due to constantly performing
a minor gc */
call_handle_event(get_base_window(event.xany.window), event.type);
}
/* C_interrupts_enabled = i; */
}
The call_handle_event is a scheme function:
(define-external (call_handle_event (c-pointer w) (unsigned-long type)) void
...)
If I wrap the function in the C_interrupts_enabled/disabled (ie. uncomment the
relevant lines above) things seem to work fine. This is because
handle_interrupts never gets called I assume.
From your question I'm guessing that there might be a problem with calling
back to scheme?