Showing
2 changed files
with
6 additions
and
6 deletions
... | ... | @@ -41,8 +41,8 @@ doRegister(const void * _node, const void * data) |
41 | 41 | if (handler_queue_hv) { |
42 | 42 | handler_queue = *(TR_Queue *)handler_queue_hv->value; |
43 | 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 | 46 | // TODO change TR_Queue to TR_Dynarray as this is no queue. |
47 | 47 | handler_queue_hv = TR_new( |
48 | 48 | TR_HashValue, | ... | ... |
... | ... | @@ -70,17 +70,17 @@ TR_eventDispatcherStart(TR_EventDispatcher this) |
70 | 70 | : NULL; |
71 | 71 | |
72 | 72 | if (handler_queue) { |
73 | - size_t idx = TR_queueFirst(handler_queue); | |
73 | + size_t idx = TR_listFirst((TR_List)handler_queue); | |
74 | 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 | 78 | TR_EventDone this_done; |
79 | 79 | |
80 | 80 | this_done = TR_eventHandlerHandleEvent(handler, event); |
81 | 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 | 86 | if (TR_EVENT_DONE == done) { | ... | ... |
Please
register
or
login
to post a comment