summaryrefslogtreecommitdiff
path: root/plugins/pychrysa/gui/panels
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/pychrysa/gui/panels')
-rw-r--r--plugins/pychrysa/gui/panels/panel.c5
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);