summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2019-01-04 19:14:31 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2019-01-04 19:14:31 (GMT)
commit7b580bd991c5218b8c7d24fa0b396c380810cc73 (patch)
tree270ea58812e44c0b4bcd64ea852e74bcfbdfcbb6 /plugins
parentb25ed9dfb2d7c5c4e39b7d26ef033e6744022f00 (diff)
Simplified code.
Diffstat (limited to 'plugins')
-rw-r--r--plugins/pychrysalide/arch/processor.c13
-rw-r--r--plugins/pychrysalide/gui/panels/panel.c13
-rw-r--r--plugins/pychrysalide/plugin.c13
3 files changed, 21 insertions, 18 deletions
diff --git a/plugins/pychrysalide/arch/processor.c b/plugins/pychrysalide/arch/processor.c
index 4feaa8b..8fc2598 100644
--- a/plugins/pychrysalide/arch/processor.c
+++ b/plugins/pychrysalide/arch/processor.c
@@ -164,14 +164,15 @@ static PyObject *py_arch_processor_new(PyTypeObject *type, PyObject *args, PyObj
(GClassInitFunc)py_arch_processor_init_gclass, NULL);
if (first_time)
+ {
status = register_class_for_dynamic_pygobject(gtype, type, base);
- else
- status = true;
- if (!status)
- {
- result = NULL;
- goto exit;
+ if (!status)
+ {
+ result = NULL;
+ goto exit;
+ }
+
}
/* On crée, et on laisse ensuite la main à PyGObject_Type.tp_init() */
diff --git a/plugins/pychrysalide/gui/panels/panel.c b/plugins/pychrysalide/gui/panels/panel.c
index d4062d3..0db1df8 100644
--- a/plugins/pychrysalide/gui/panels/panel.c
+++ b/plugins/pychrysalide/gui/panels/panel.c
@@ -113,14 +113,15 @@ static PyObject *py_panel_item_new(PyTypeObject *type, PyObject *args, PyObject
(GClassInitFunc)py_panel_item_init_gclass, NULL);
if (first_time)
+ {
status = register_class_for_dynamic_pygobject(gtype, type, base);
- else
- status = true;
- if (!status)
- {
- result = NULL;
- goto exit;
+ if (!status)
+ {
+ result = NULL;
+ goto exit;
+ }
+
}
/* On crée, et on laisse ensuite la main à PyGObject_Type.tp_init() */
diff --git a/plugins/pychrysalide/plugin.c b/plugins/pychrysalide/plugin.c
index 22bfabb..7667af7 100644
--- a/plugins/pychrysalide/plugin.c
+++ b/plugins/pychrysalide/plugin.c
@@ -179,14 +179,15 @@ static PyObject *py_plugin_module_new(PyTypeObject *type, PyObject *args, PyObje
(GClassInitFunc)py_plugin_module_init_gclass, NULL);
if (first_time)
+ {
status = register_class_for_dynamic_pygobject(gtype, type, base);
- else
- status = true;
- if (!status)
- {
- result = NULL;
- goto exit;
+ if (!status)
+ {
+ result = NULL;
+ goto exit;
+ }
+
}
/* On crée, et on laisse ensuite la main à PyGObject_Type.tp_init() */