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
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_SCRIPT_REC *script;
PERL_SOURCE_REC *rec; PERL_SOURCE_REC *rec;
GIOChannel *channel;
const char *pkg; const char *pkg;
pkg = perl_get_package(); 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->func = perl_func_sv_inc(func, pkg);
rec->data = SvREFCNT_inc(data); rec->data = SvREFCNT_inc(data);
channel = g_io_channel_unix_new(source); rec->tag = g_input_add_poll(source, G_PRIORITY_DEFAULT, condition,
rec->tag = g_input_add(channel, condition,
(GInputFunction) perl_source_event, rec); (GInputFunction) perl_source_event, rec);
g_io_channel_unref(channel);
perl_sources = g_slist_append(perl_sources, rec); perl_sources = g_slist_append(perl_sources, rec);
return rec->tag; return rec->tag;