Merge lp://staging/~oif-team/geis/event-control-functions into lp://staging/geis
Proposed by
Stephen M. Webb
Status: | Superseded |
---|---|
Proposed branch: | lp://staging/~oif-team/geis/event-control-functions |
Merge into: | lp://staging/geis |
Prerequisite: | lp://staging/geis/2.x |
Diff against target: |
1294 lines (+1020/-24) 18 files modified
.bzrignore (+7/-7) ChangeLog (+55/-0) include/geis/geis.h (+161/-1) libutouch-geis/Makefile.am (+3/-1) libutouch-geis/geis.c (+165/-10) libutouch-geis/geis_attr.c (+16/-0) libutouch-geis/geis_attr.h (+5/-0) libutouch-geis/geis_event.c (+124/-0) libutouch-geis/geis_event.h (+41/-0) libutouch-geis/geis_event_queue.c (+154/-0) libutouch-geis/geis_event_queue.h (+74/-0) libutouch-geis/geis_private.h (+14/-1) libutouch-geis/libutouch-geis.ver (+3/-0) testsuite/libutouch-geis/Makefile.am (+2/-0) testsuite/libutouch-geis/check_attr.c (+27/-0) testsuite/libutouch-geis/check_backend_event_posting.c (+70/-0) testsuite/libutouch-geis/check_event_queue.c (+88/-0) testsuite/libutouch-geis/check_geis2_internals.c (+11/-4) |
To merge this branch: | bzr merge lp://staging/~oif-team/geis/event-control-functions |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Chase Douglas (community) | Needs Fixing | ||
Review via email: mp+42791@code.staging.launchpad.net |
This proposal has been superseded by a proposal from 2010-12-10.
Description of the change
Adds the event control functions.
To post a comment you must log in.
1. I would remove the geis_event_delete calls until it's implemented. I don't like seeing "#if 0" :). If you want to note something that should be changed in the future, I think a "FIXME: <blah>" is better. It gives context as to what is needed.
2. geis_event_ queue_push allocates a GeisEvent on the stack and copies the event passed in. Then, the event is copied once more into the GeisEventQueueNode. The stack allocation and copying of the GeisEvent into the function is unnecessary. A pointer should be passed instead.
3. The event queue is a queue, not a stack. Queue semantics should be used, such as enqueue and dequeue. Using push and pop confuses me until I remember that it's a queue :).
4. geis_event_ queue_front copies data into a geis event. Why not just return a pointer to the event? This would cut down on extra allocating and copying.
5. Imo, a cleaner interface is a dequeue function that returns the event if available and removes it from the queue. This requires one function call instead of two to retrieve the event and remove it.