summaryrefslogtreecommitdiffstats
path: root/gio
diff options
context:
space:
mode:
authorPaul Pogonyshev <pogonyshev@gmx.net>2008-08-11 20:15:20 +0000
committerPaul Pogonyshev <paulp@src.gnome.org>2008-08-11 20:15:20 +0000
commitbc1a275dedc30f56face403118699ebf9aafa846 (patch)
tree12120a93b4903081958a9287d2da20adec9e8420 /gio
parent41194973be3d0974521c86f18affa4e53904f10e (diff)
downloadpygobject-bc1a275dedc30f56face403118699ebf9aafa846.tar.gz
pygobject-bc1a275dedc30f56face403118699ebf9aafa846.tar.xz
pygobject-bc1a275dedc30f56face403118699ebf9aafa846.zip
Bug 547104 – improve type wrapper creation
2008-08-11 Paul Pogonyshev <pogonyshev@gmx.net> Bug 547104 – improve type wrapper creation * gobject/pygobject.c (pygobject_register_class): Use new pygobject_inherit_slots() to propagate custom slots in normal types too. (pygobject_inherit_slots): New function, break out of pygobject_new_with_interfaces() and rewrite a bit. (pygobject_find_slot_for): Add new argument that can forbid overriding non-NULL slots. * gio/gicon.override (pygio_do_icon_richcompare): Remove, the code is now directly in _wrap_g_icon_tp_richcompare(). (_wrap_g_file_icon_tp_richcompare, _wrap_g_file_icon_tp_hash) (_wrap_g_themed_icon_tp_richcompare, _wrap_g_themed_icon_tp_hash): Remove, duplicating code in this way is not needed anymore. svn path=/trunk/; revision=940
Diffstat (limited to 'gio')
-rw-r--r--gio/gicon.override44
1 files changed, 1 insertions, 43 deletions
diff --git a/gio/gicon.override b/gio/gicon.override
index 8da8d74..6cbe180 100644
--- a/gio/gicon.override
+++ b/gio/gicon.override
@@ -20,11 +20,6 @@
* USA
*/
%%
-headers
-
-static PyObject * pygio_do_icon_richcompare(PyGObject *self, PyGObject *other, int op);
-
-%%
ignore-glob
g_icon_hash
g_themed_icon_new_from_names
@@ -32,7 +27,7 @@ ignore-glob
%%
override-slot GIcon.tp_richcompare
static PyObject *
-pygio_do_icon_richcompare(PyGObject *self, PyGObject *other, int op)
+_wrap_g_icon_tp_richcompare(PyGObject *self, PyGObject *other, int op)
{
PyObject *result;
@@ -60,11 +55,6 @@ pygio_do_icon_richcompare(PyGObject *self, PyGObject *other, int op)
Py_INCREF(result);
return result;
}
-static PyObject *
-_wrap_g_icon_tp_richcompare(PyGObject *self, PyGObject *other, int op)
-{
- return pygio_do_icon_richcompare(self, other, op);
-}
%%
override-slot GIcon.tp_hash
static long
@@ -180,22 +170,6 @@ _wrap_g_loadable_icon_load_finish(PyGObject *self,
return result;
}
%%
-override-slot GFileIcon.tp_richcompare
-/* We need to duplicate, because GIcon is an interface, not a class. */
-static PyObject *
-_wrap_g_file_icon_tp_richcompare(PyGObject *self, PyGObject *other, int op)
-{
- return pygio_do_icon_richcompare(self, other, op);
-}
-%%
-override-slot GFileIcon.tp_hash
-/* We need to duplicate, because GIcon is an interface, not a class. */
-static long
-_wrap_g_file_icon_tp_hash(PyGObject *self)
-{
- return g_icon_hash(G_ICON(self->obj));
-}
-%%
override-slot GFileIcon.tp_repr
static PyObject *
_wrap_g_file_icon_tp_repr(PyGObject *self)
@@ -296,22 +270,6 @@ _wrap_g_themed_icon_get_names(PyGObject *self)
return ret;
}
%%
-override-slot GThemedIcon.tp_richcompare
-/* We need to duplicate, because GIcon is an interface, not a class. */
-static PyObject *
-_wrap_g_themed_icon_tp_richcompare(PyGObject *self, PyGObject *other, int op)
-{
- return pygio_do_icon_richcompare(self, other, op);
-}
-%%
-override-slot GThemedIcon.tp_hash
-/* We need to duplicate, because GIcon is an interface, not a class. */
-static long
-_wrap_g_themed_icon_tp_hash(PyGObject *self)
-{
- return g_icon_hash(G_ICON(self->obj));
-}
-%%
override-slot GThemedIcon.tp_repr
static PyObject *
_wrap_g_themed_icon_tp_repr(PyGObject *self)