summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Henstridge <james@daa.com.au>2001-09-22 00:19:18 +0000
committerJames Henstridge <jamesh@src.gnome.org>2001-09-22 00:19:18 +0000
commitab673bd856e98875633b7b633fb7920a7e3c7795 (patch)
tree74fd4fd033fb5990e71aeb8f81e0598f6d22f92b
parent810643f90c9fdf74ee7ea6a3cce6eaf7678ad61e (diff)
downloadpygtk-ab673bd856e98875633b7b633fb7920a7e3c7795.tar.gz
(pygobject__gobject_init__): add __gobject_init__ method, that just calls
2001-09-22 James Henstridge <james@daa.com.au> (pygobject__gobject_init__): add __gobject_init__ method, that just calls pygobject_init. (pygobject_methods): readd __gobject_init__ method.
-rw-r--r--ChangeLog3
-rw-r--r--gobject/gobjectmodule.c12
-rw-r--r--gobjectmodule.c12
3 files changed, 25 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 452c2900..86067eb6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,9 @@
(pyg_register_interface): same here.
(initgobject): set the ob_type member of PyGInterface_Type and
PyGBoxed_Type.
+ (pygobject__gobject_init__): add __gobject_init__ method, that
+ just calls pygobject_init.
+ (pygobject_methods): readd __gobject_init__ method.
2001-09-21 James Henstridge <james@daa.com.au>
diff --git a/gobject/gobjectmodule.c b/gobject/gobjectmodule.c
index 1f1b3c38..15102864 100644
--- a/gobject/gobjectmodule.c
+++ b/gobject/gobjectmodule.c
@@ -1008,6 +1008,15 @@ pygobject_init(PyGObject *self, PyObject *args, PyObject *kwargs)
}
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;
+}
+
+static PyObject *
pygobject_get_property(PyGObject *self, PyObject *args)
{
gchar *param_name;
@@ -1407,7 +1416,8 @@ pygobject_stop_emission(PyGObject *self, PyObject *args)
}
static PyMethodDef pygobject_methods[] = {
- /*{ "__gobject_init__", (PyCFunction)pygobject__init__, METH_VARARGS },*/
+ { "__gobject_init__", (PyCFunction)pygobject__gobject_init__,
+ METH_VARARGS|METH_KEYWORDS },
{ "get_property", (PyCFunction)pygobject_get_property, METH_VARARGS },
{ "set_property", (PyCFunction)pygobject_set_property, METH_VARARGS },
{ "freeze_notify", (PyCFunction)pygobject_freeze_notify, METH_VARARGS },
diff --git a/gobjectmodule.c b/gobjectmodule.c
index 1f1b3c38..15102864 100644
--- a/gobjectmodule.c
+++ b/gobjectmodule.c
@@ -1008,6 +1008,15 @@ pygobject_init(PyGObject *self, PyObject *args, PyObject *kwargs)
}
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;
+}
+
+static PyObject *
pygobject_get_property(PyGObject *self, PyObject *args)
{
gchar *param_name;
@@ -1407,7 +1416,8 @@ pygobject_stop_emission(PyGObject *self, PyObject *args)
}
static PyMethodDef pygobject_methods[] = {
- /*{ "__gobject_init__", (PyCFunction)pygobject__init__, METH_VARARGS },*/
+ { "__gobject_init__", (PyCFunction)pygobject__gobject_init__,
+ METH_VARARGS|METH_KEYWORDS },
{ "get_property", (PyCFunction)pygobject_get_property, METH_VARARGS },
{ "set_property", (PyCFunction)pygobject_set_property, METH_VARARGS },
{ "freeze_notify", (PyCFunction)pygobject_freeze_notify, METH_VARARGS },