diff options
author | James Henstridge <james@daa.com.au> | 2001-09-22 00:19:18 +0000 |
---|---|---|
committer | James Henstridge <jamesh@src.gnome.org> | 2001-09-22 00:19:18 +0000 |
commit | 1581fecd34bbdce8b78e8604349bf6b5b02400a5 (patch) | |
tree | 5c0e54cf95d2c070ed30b93c81de28a724740315 | |
parent | 26ce0bb920ed37f829c4dbe12f5a8666914f5eb8 (diff) | |
download | pygobject-1581fecd34bbdce8b78e8604349bf6b5b02400a5.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-- | gobject/gobjectmodule.c | 12 |
1 files changed, 11 insertions, 1 deletions
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 }, |