Changeset bcde7926 for perlglue.xs


Ignore:
Timestamp:
Jun 22, 2011, 12:37:21 AM (13 years ago)
Author:
David Benjamin <davidben@mit.edu>
Branches:
master, release-1.10, release-1.8, release-1.9
Children:
bbb7876
Parents:
074bdaa
git-author:
David Benjamin <davidben@mit.edu> (05/24/11 01:10:12)
git-committer:
David Benjamin <davidben@mit.edu> (06/22/11 00:37:21)
Message:
Reimplement BarnOwl::add_io_dispatch with AnyEvent

We can emulate the interesting semantics with perl. The one difference
is that perl code can now register an IO dispatch on file descriptors C
code was interested in. This isn't a big deal was Glib can handle
multiple watches on the same FD. Granted, more than one reader on an FD
would cause trouble, but there was nothing stopping perl code from
reading from an FD we cared about anyway.

AnyEvent also does not support select's exceptfd, so this is a slight
behavior change, but probably an uninteresting one.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • perlglue.xs

    r074bdaa rbcde7926  
    326326                g_free(rv);
    327327
    328 void
    329 remove_io_dispatch(fd)
    330         int fd
    331         CODE:
    332         owl_select_remove_perl_io_dispatch(fd);
    333 
    334328AV*
    335329all_filters()
     
    507501                                      ival);
    508502
    509 void
    510 add_io_dispatch(fd, mode, cb)
    511         int fd
    512         int mode
    513         SV * cb
    514         CODE:
    515         owl_select_add_perl_io_dispatch(fd, mode, newSVsv(cb));
    516 
    517503MODULE = BarnOwl                PACKAGE = BarnOwl::Editwin
    518504
Note: See TracChangeset for help on using the changeset viewer.