- for(i = 0 ; i < src->array->len ; i++) {
- guint index = g_array_index(src->array, guint, i);
- LttvHooks *srch = lttv_hooks_by_id_find(src, index);
- LttvHooks *desth = lttv_hooks_by_id_find(dest, index);
- lttv_hooks_add_list(desth, srch);
- }
-}
-
-LttvHooksByIdChannelArray *lttv_hooks_by_id_channel_new(void)
-{
- LttvHooksByIdChannelArray *h = g_new(LttvHooksByIdChannelArray, 1);
-
- h->array = g_array_new(FALSE, FALSE, sizeof(LttvHooksByIdChannel));
- return h;
-}
-
-void lttv_hooks_by_id_channel_destroy(LttvHooksByIdChannelArray *h)
-{
- LttvHooksByIdChannel *hid;
- int i;
-
- for (i = 0; i < h->array->len; i++) {
- hid = &g_array_index(h->array, LttvHooksByIdChannel, i);
- lttv_hooks_by_id_destroy(hid->hooks_by_id);
- }
- g_array_free(h->array, TRUE);
- g_free(h);
-}
-
-static LttvHooksByIdChannel *
-lttv_hooks_by_id_channel_find_channel(LttvHooksByIdChannelArray *h,
- GQuark channel)
-{
- LttvHooksByIdChannel *hid;
- int i, found = 0;
-
- for (i = 0; i < h->array->len; i++) {
- hid = &g_array_index(h->array, LttvHooksByIdChannel, i);
- if (hid->channel == channel) {
- found = 1;
- break;
+ if(likely(h != NULL)) {
+ for(i = 0 ; i < h->len ; i++) {
+ c = &g_array_index(h, LttvHookClosure, i);
+ printf("%p:%i:%i,", c->hook, c->ref_count, c->prio);