Changeset f36cd97 for owl.c


Ignore:
Timestamp:
Dec 17, 2008, 5:12:37 PM (15 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, debian, release-1.10, release-1.4, release-1.5, release-1.6, release-1.7, release-1.8, release-1.9
Children:
1895c29
Parents:
1631825
git-author:
Nelson Elhage <nelhage@mit.edu> (12/17/08 15:44:15)
git-committer:
Nelson Elhage <nelhage@mit.edu> (12/17/08 17:12:37)
Message:
Add a void* data to owl_dispatch and pass it around.

Add a void* data field for the use of dispatches, and pass around the
owl_dispatch. This allows one dispatch function to be used for
multiple fd's, and lets us eliminate perl-specific code from the
dispatch loop. In addition, we need to add a destructor to
owl_dispatch so that perl dispatches can have their SV* decref'd on
destroy.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • owl.c

    rc675b39 rf36cd97  
    190190    d->fd = STDIN;
    191191    d->cfunc = &owl_process_input;
    192     d->pfunc = NULL;
     192    d->destroy = NULL;
    193193    owl_select_add_dispatch(d);
    194194  }
     
    201201    d->fd = ZGetFD();
    202202    d->cfunc = &owl_zephyr_process_events;
    203     d->pfunc = NULL;
     203    d->destroy = NULL;
    204204    owl_select_add_dispatch(d);
    205205    owl_global_set_havezephyr(&g);
     
    401401
    402402
    403 #ifdef HAVE_LIBZEPHYR
    404   /* Check for any zephyrs that have come in while we've done init. */
    405   owl_zephyr_process_events();
    406 #endif
    407  
    408403  owl_function_debugmsg("startup: entering main loop");
    409404  /* main loop */
     
    609604}
    610605
    611 void owl_process_input()
     606void owl_process_input(owl_dispatch *d)
    612607{
    613608  int ret;
Note: See TracChangeset for help on using the changeset viewer.