From 7b580bd991c5218b8c7d24fa0b396c380810cc73 Mon Sep 17 00:00:00 2001
From: Cyrille Bagard <nocbos@gmail.com>
Date: Fri, 4 Jan 2019 20:14:31 +0100
Subject: Simplified code.

---
 plugins/pychrysalide/arch/processor.c   | 13 +++++++------
 plugins/pychrysalide/gui/panels/panel.c | 13 +++++++------
 plugins/pychrysalide/plugin.c           | 13 +++++++------
 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() */
-- 
cgit v0.11.2-87-g4458