diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2012-12-21 23:34:14 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2012-12-21 23:34:14 (GMT) |
commit | 3bfff245c47c4dd1404c5ea7af0ff4858ac8d130 (patch) | |
tree | dc3613e2ebdef4d04fa874335795268dba732d31 /plugins/pychrysa/gui/panels | |
parent | 0cfcbee3c536ac6d11ec806d47ce4c136f695697 (diff) |
Resolved relative addresses for routines and fixed bugs related to PyGObjects construction.
git-svn-id: svn://svn.gna.org/svn/chrysalide/trunk@308 abbe820e-26c8-41b2-8c08-b7b2b41f8b0a
Diffstat (limited to 'plugins/pychrysa/gui/panels')
-rw-r--r-- | plugins/pychrysa/gui/panels/panel.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/pychrysa/gui/panels/panel.c b/plugins/pychrysa/gui/panels/panel.c index 4b982d0..fc261b5 100644 --- a/plugins/pychrysa/gui/panels/panel.c +++ b/plugins/pychrysa/gui/panels/panel.c @@ -65,7 +65,7 @@ static PyObject *py_panel_item_new(PyTypeObject *type, PyObject *args, PyObject GEditorItem *item; /* Version GLib du format */ ret = PyArg_ParseTuple(args, "ssOs", &name, &lname, &widget, &path); - if (!ret) return Py_None; + if (!ret) Py_RETURN_NONE; item = g_panel_item_new(get_internal_ref(), name, lname, GTK_WIDGET(pygobject_get(widget)), path); @@ -73,7 +73,7 @@ static PyObject *py_panel_item_new(PyTypeObject *type, PyObject *args, PyObject result = _py_panel_item_from_c(G_PANEL_ITEM(item), type); g_object_unref(item); - return (PyObject *)result; + return result; } @@ -102,6 +102,7 @@ PyObject *_py_panel_item_from_c(GPanelItem *item, PyTypeObject *type) type = (PyTypeObject *)PyObject_GetAttrString(module, "PanelItem"); Py_DECREF(module); } + else Py_INCREF(type); pychrysalide_set_instance_data(G_OBJECT(item), type); |