[pygobject] Drop legacy __gobject_init__ method of GObject.Object.



commit 3ace5c2e2268285a5dcb39889fcb2a71bc1063bd
Author: Steve FrÃcinaux <code istique net>
Date:   Fri Sep 2 08:37:15 2011 +0200

    Drop legacy __gobject_init__ method of GObject.Object.
    
    This method was used in gobject initialization at some point, but now
    using GObject.__init__() is sufficient, so let's not keep this old
    method around and let people misuse it.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=658032

 examples/signal.py      |    2 --
 gi/_gobject/pygobject.c |   11 -----------
 2 files changed, 0 insertions(+), 13 deletions(-)
---
diff --git a/examples/signal.py b/examples/signal.py
index d06fb02..d1b7357 100644
--- a/examples/signal.py
+++ b/examples/signal.py
@@ -5,8 +5,6 @@ class C(GObject.GObject):
         'my_signal': (GObject.SIGNAL_RUN_FIRST, GObject.TYPE_NONE,
                       (GObject.TYPE_INT,))
     }
-    def __init__(self):
-        self.__gobject_init__() # default constructor using our new GType
     def do_my_signal(self, arg):
         print "C: class closure for `my_signal' called with argument", arg
 
diff --git a/gi/_gobject/pygobject.c b/gi/_gobject/pygobject.c
index 0ad7e95..48a9f18 100644
--- a/gi/_gobject/pygobject.c
+++ b/gi/_gobject/pygobject.c
@@ -1178,15 +1178,6 @@ pygobject_init(PyGObject *self, PyObject *args, PyObject *kwargs)
     return (self->obj) ? 0 : -1;
 }
 
-static PyObject *
-pygobject__gobject_init__(PyGObject *self, PyObject *args, PyObject *kwargs)
-{
-    if (pygobject_init(self, args, kwargs) < 0)
-	return NULL;
-    Py_INCREF(Py_None);
-    return Py_None;
-}
-
 #define CHECK_GOBJECT(self) \
     if (!G_IS_OBJECT(self->obj)) {                                           \
 	PyErr_Format(PyExc_TypeError,                                        \
@@ -2033,8 +2024,6 @@ pygobject_handler_unblock_by_func(PyGObject *self, PyObject *args)
 }
 
 static PyMethodDef pygobject_methods[] = {
-    { "__gobject_init__", (PyCFunction)pygobject__gobject_init__,
-      METH_VARARGS|METH_KEYWORDS },
     { "get_property", (PyCFunction)pygobject_get_property, METH_VARARGS },
     { "get_properties", (PyCFunction)pygobject_get_properties, METH_VARARGS },
     { "set_property", (PyCFunction)pygobject_set_property, METH_VARARGS },



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