static VALUE rg_fileno(VALUE self) { #ifdef G_OS_UNIX return INT2NUM(g_io_channel_unix_get_fd(_SELF(self))); #elif defined(G_OS_WIN32) return INT2NUM(g_io_channel_win32_get_fd(_SELF(self))); #else rb_warn("GLib::IOChannel#fd is supported on " "UNIX and Windows environment only."); return Qnil; #endif }
gint g_io_channel_unix_get_fd (GIOChannel *channel) { return g_io_channel_win32_get_fd (channel); }