Changeset f36cd97 for owl.h


Ignore:
Timestamp:
Dec 17, 2008, 5:12:37 PM (16 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.h

    rc675b39 rf36cd97  
    526526
    527527typedef struct _owl_dispatch {
    528   int fd;           /* FD to watch for dispatch. */
    529   void (*cfunc)();  /* C function to dispatch to. */
    530   SV *pfunc;        /* Perl function to dispatch to. */
     528  int fd;                                 /* FD to watch for dispatch. */
     529  void (*cfunc)(struct _owl_dispatch*);   /* C function to dispatch to. */
     530  void (*destroy)(struct _owl_dispatch*); /* Destructor */
     531  void *data;
    531532} owl_dispatch;
    532533
Note: See TracChangeset for help on using the changeset viewer.