1
0
mirror of https://github.com/irssi/irssi.git synced 2024-09-01 04:14:16 -04:00

Use g_input_add_poll to create a watcher for an fd.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4819 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Emanuele Giaquinta 2008-05-13 14:43:33 +00:00 committed by exg
parent e592a1f085
commit fd44be823e

View File

@ -123,7 +123,6 @@ int perl_input_add(int source, int condition, SV *func, SV *data, int once)
{
PERL_SCRIPT_REC *script;
PERL_SOURCE_REC *rec;
GIOChannel *channel;
const char *pkg;
pkg = perl_get_package();
@ -138,10 +137,8 @@ int perl_input_add(int source, int condition, SV *func, SV *data, int once)
rec->func = perl_func_sv_inc(func, pkg);
rec->data = SvREFCNT_inc(data);
channel = g_io_channel_unix_new(source);
rec->tag = g_input_add(channel, condition,
rec->tag = g_input_add_poll(source, G_PRIORITY_DEFAULT, condition,
(GInputFunction) perl_source_event, rec);
g_io_channel_unref(channel);
perl_sources = g_slist_append(perl_sources, rec);
return rec->tag;