Showing
2 changed files
with
6 additions
and
6 deletions
@@ -41,8 +41,8 @@ doRegister(const void * _node, const void * data) | @@ -41,8 +41,8 @@ doRegister(const void * _node, const void * data) | ||
41 | if (handler_queue_hv) { | 41 | if (handler_queue_hv) { |
42 | handler_queue = *(TR_Queue *)handler_queue_hv->value; | 42 | handler_queue = *(TR_Queue *)handler_queue_hv->value; |
43 | } else { | 43 | } else { |
44 | - handler_queue = TR_new(TR_Queue); | ||
45 | - handler_queue->free_msgs = 0; | 44 | + handler_queue = TR_new(TR_Queue); |
45 | + ((TR_List)handler_queue)->free_msgs = 0; | ||
46 | // TODO change TR_Queue to TR_Dynarray as this is no queue. | 46 | // TODO change TR_Queue to TR_Dynarray as this is no queue. |
47 | handler_queue_hv = TR_new( | 47 | handler_queue_hv = TR_new( |
48 | TR_HashValue, | 48 | TR_HashValue, |
@@ -70,17 +70,17 @@ TR_eventDispatcherStart(TR_EventDispatcher this) | @@ -70,17 +70,17 @@ TR_eventDispatcherStart(TR_EventDispatcher this) | ||
70 | : NULL; | 70 | : NULL; |
71 | 71 | ||
72 | if (handler_queue) { | 72 | if (handler_queue) { |
73 | - size_t idx = TR_queueFirst(handler_queue); | 73 | + size_t idx = TR_listFirst((TR_List)handler_queue); |
74 | TR_EventDone done = TR_EVENT_PENDING; | 74 | TR_EventDone done = TR_EVENT_PENDING; |
75 | 75 | ||
76 | - while (idx != TR_queueLast(handler_queue) + 1) { | ||
77 | - TR_EventHandler handler = handler_queue->data[idx]; | 76 | + while (idx != TR_listLast((TR_List)handler_queue) + 1) { |
77 | + TR_EventHandler handler = ((TR_List)handler_queue)->data[idx]; | ||
78 | TR_EventDone this_done; | 78 | TR_EventDone this_done; |
79 | 79 | ||
80 | this_done = TR_eventHandlerHandleEvent(handler, event); | 80 | this_done = TR_eventHandlerHandleEvent(handler, event); |
81 | done = TR_EVENT_DONE == done ? done : this_done; | 81 | done = TR_EVENT_DONE == done ? done : this_done; |
82 | 82 | ||
83 | - idx = idx + 1 == TR_queueSize(handler_queue) ? 0 : idx + 1; | 83 | + idx = idx + 1 == TR_queueSize((TR_List)handler_queue) ? 0 : idx + 1; |
84 | } | 84 | } |
85 | 85 | ||
86 | if (TR_EVENT_DONE == done) { | 86 | if (TR_EVENT_DONE == done) { |
Please
register
or
login
to post a comment