[pybank] Remove superfluous arg in GIInterFaceInfo.register()



commit 1261e6ad28e61994ed65e02438c513f306fd9548
Author: Tomeu Vizoso <tomeu sugarlabs org>
Date:   Wed May 27 18:49:08 2009 +0200

    Remove superfluous arg in GIInterFaceInfo.register()
---
 bank/bank-info.c |   10 +++-------
 bank/module.py   |    2 +-
 2 files changed, 4 insertions(+), 8 deletions(-)

diff --git a/bank/bank-info.c b/bank/bank-info.c
index 2fe9a1c..9175207 100644
--- a/bank/bank-info.c
+++ b/bank/bank-info.c
@@ -957,20 +957,16 @@ initialize_interface (GTypeInterface *iface, PyTypeObject *pytype)
 }
 
 static PyObject *
-_wrap_g_interface_info_register(PyGIBaseInfo *self, PyObject *args)
+_wrap_g_interface_info_register(PyGIBaseInfo *self)
 {
-    PyObject *obj;
     GType gtype;
     GInterfaceInfo *info_struct = g_new0(GInterfaceInfo, 1);
 
-    if (!PyArg_ParseTuple(args, "O:TypeInfo.register", &obj))
-        return NULL;
-
     info_struct->interface_init = (GInterfaceInitFunc) initialize_interface;
     info_struct->interface_finalize = NULL;
     info_struct->interface_data = NULL;
 
-    gtype = pyg_type_from_object(obj);
+    gtype = g_registered_type_info_get_g_type(self->info);
     pyg_register_interface_info(gtype, info_struct);
 
     Py_INCREF(Py_None);
@@ -979,7 +975,7 @@ _wrap_g_interface_info_register(PyGIBaseInfo *self, PyObject *args)
 
 static PyMethodDef _PyGIInterfaceInfo_methods[] = {
     { "getMethods", (PyCFunction)_wrap_g_interface_info_get_methods, METH_NOARGS },
-    { "register", (PyCFunction)_wrap_g_interface_info_register, METH_VARARGS },
+    { "register", (PyCFunction)_wrap_g_interface_info_register, METH_NOARGS },
     { NULL, NULL, 0 }
 };
 
diff --git a/bank/module.py b/bank/module.py
index d102872..2a87816 100644
--- a/bank/module.py
+++ b/bank/module.py
@@ -184,7 +184,7 @@ class DynamicModule(object):
         if gtype is not None:
             klass.__gtype__ = gtype
             gtype.pytype = klass
-            interface_info.register(gtype)
+            interface_info.register()
         self.__dict__[name] = klass
 
         return klass



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]