cur = newcnt; \
}
+#define array_free(stem, idx) \
+ free (stem ## s idx); stem ## cnt idx = stem ## max idx = 0;
+
/*****************************************************************************/
static void
anfd->reify = 0;
- if (anfd->events != events)
- {
- method_modify (EV_A_ fd, anfd->events, events);
- anfd->events = events;
- }
+ method_modify (EV_A_ fd, anfd->events, events);
+ anfd->events = events;
}
fdchangecnt = 0;
void
loop_destroy (EV_P)
{
+ int i;
+
#if EV_USE_WIN32
if (method == EVMETHOD_WIN32 ) win32_destroy (EV_A);
#endif
if (method == EVMETHOD_SELECT) select_destroy (EV_A);
#endif
+ for (i = NUMPRI; i--; )
+ array_free (pending, [i]);
+
+ array_free (fdchange, );
+ array_free (timer, );
+ array_free (periodic, );
+ array_free (idle, );
+ array_free (prepare, );
+ array_free (check, );
+
method = 0;
/*TODO*/
}
if (p->w)
{
p->w->pending = 0;
-
- (*(void (**)(EV_P_ W, int))&p->w->cb) (EV_A_ p->w, p->events);
+ p->w->cb (EV_A_ p->w, p->events);
}
}
}