diff options
author | Gian Mario Tagliaretti <gianmt@gnome.org> | 2009-12-30 16:21:49 +0100 |
---|---|---|
committer | Gian Mario Tagliaretti <gianmt@gnome.org> | 2009-12-30 16:21:49 +0100 |
commit | 50960656815b0897a5ebe5f011537b8dcbdc857e (patch) | |
tree | 0819db5512b5f93e3766f3e4d196d84f5817c845 /gio | |
parent | de7a359e81792ae8573ac944455ea289985449ed (diff) | |
download | pygobject-50960656815b0897a5ebe5f011537b8dcbdc857e.tar.gz pygobject-50960656815b0897a5ebe5f011537b8dcbdc857e.tar.xz pygobject-50960656815b0897a5ebe5f011537b8dcbdc857e.zip |
Wrap gio.Socket.condition_check() and add a test
Diffstat (limited to 'gio')
-rw-r--r-- | gio/Makefile.am | 1 | ||||
-rw-r--r-- | gio/gio.override | 1 | ||||
-rw-r--r-- | gio/gsocket.override | 41 |
3 files changed, 43 insertions, 0 deletions
diff --git a/gio/Makefile.am b/gio/Makefile.am index 51a8fbc..a734928 100644 --- a/gio/Makefile.am +++ b/gio/Makefile.am @@ -56,6 +56,7 @@ GIO_OVERRIDES = \ gmount.override \ goutputstream.override \ gresolver.override \ + gsocket.override \ gvolume.override \ gvolumemonitor.override diff --git a/gio/gio.override b/gio/gio.override index 62833ee..d5ef514 100644 --- a/gio/gio.override +++ b/gio/gio.override @@ -248,6 +248,7 @@ include ginputstream.override goutputstream.override gresolver.override + gsocket.override gvolume.override gvolumemonitor.override %% diff --git a/gio/gsocket.override b/gio/gsocket.override new file mode 100644 index 0000000..2f009fc --- /dev/null +++ b/gio/gsocket.override @@ -0,0 +1,41 @@ +/* -*- Mode: C; c-basic-offset: 4 -*- + * pygobject - Python bindings for GObject + * Copyright (C) 2009 Gian Mario Tagliaretti + * + * gsocket.override: module overrides for GSocket and related types + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 + * USA + */ + +%% +override g_socket_condition_check kwargs +static PyObject * +_wrap_g_socket_condition_check(PyGObject *self, + PyObject *args, + PyObject *kwargs) +{ + static char *kwlist[] = { "condition", NULL }; + gint condition, ret; + + if (!PyArg_ParseTupleAndKeywords(args, kwargs, + "i:gio.Socket.condition_check", + kwlist, &condition)) + return NULL; + + ret = g_socket_condition_check(G_SOCKET(self->obj), condition); + + return pyg_flags_from_gtype(G_TYPE_IO_CONDITION, ret); +} |