summaryrefslogtreecommitdiff
path: root/plugins/pychrysalide/arch/operands
diff options
context:
space:
mode:
authorCyrille Bagard <nocbos@gmail.com>2023-05-22 20:56:32 (GMT)
committerCyrille Bagard <nocbos@gmail.com>2023-05-22 20:56:32 (GMT)
commite1a2823b5d831349467d309ce42d56055ec9c04f (patch)
treebc4dd464d10cd379622ceb361398895d59849409 /plugins/pychrysalide/arch/operands
parent15fb909bdd8ca0f37dd71da7427ea6bc6bb71cbb (diff)
Rely on GObject-introspection implementation for some registrations.
Diffstat (limited to 'plugins/pychrysalide/arch/operands')
-rw-r--r--plugins/pychrysalide/arch/operands/immediate.c2
-rw-r--r--plugins/pychrysalide/arch/operands/known.c2
-rw-r--r--plugins/pychrysalide/arch/operands/proxy.c7
-rw-r--r--plugins/pychrysalide/arch/operands/register.c7
-rw-r--r--plugins/pychrysalide/arch/operands/target.c7
5 files changed, 17 insertions, 8 deletions
diff --git a/plugins/pychrysalide/arch/operands/immediate.c b/plugins/pychrysalide/arch/operands/immediate.c
index 62f6328..2239eb2 100644
--- a/plugins/pychrysalide/arch/operands/immediate.c
+++ b/plugins/pychrysalide/arch/operands/immediate.c
@@ -603,7 +603,7 @@ bool ensure_python_imm_operand_is_registered(void)
if (!ensure_python_renameable_operand_is_registered())
return false;
- if (!register_class_for_pygobject(dict, G_TYPE_IMM_OPERAND, type, get_python_arch_operand_type()))
+ if (!register_class_for_pygobject(dict, G_TYPE_IMM_OPERAND, type))
return false;
if (!define_imm_operand_constants(type))
diff --git a/plugins/pychrysalide/arch/operands/known.c b/plugins/pychrysalide/arch/operands/known.c
index 435ea0f..fab426e 100644
--- a/plugins/pychrysalide/arch/operands/known.c
+++ b/plugins/pychrysalide/arch/operands/known.c
@@ -169,7 +169,7 @@ bool ensure_python_known_imm_operand_is_registered(void)
if (!ensure_python_renamed_operand_is_registered())
return false;
- if (!register_class_for_pygobject(dict, G_TYPE_KNOWN_IMM_OPERAND, type, get_python_imm_operand_type()))
+ if (!register_class_for_pygobject(dict, G_TYPE_KNOWN_IMM_OPERAND, type))
return false;
}
diff --git a/plugins/pychrysalide/arch/operands/proxy.c b/plugins/pychrysalide/arch/operands/proxy.c
index 1cfd4a4..5009d29 100644
--- a/plugins/pychrysalide/arch/operands/proxy.c
+++ b/plugins/pychrysalide/arch/operands/proxy.c
@@ -105,7 +105,7 @@ static PyObject *py_proxy_operand_new(PyTypeObject *type, PyObject *args, PyObje
if (first_time)
{
- status = register_class_for_dynamic_pygobject(gtype, type, base);
+ status = register_class_for_dynamic_pygobject(gtype, type);
if (!status)
{
@@ -319,7 +319,10 @@ bool ensure_python_proxy_operand_is_registered(void)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_PROXY_OPERAND, type, get_python_arch_operand_type()))
+ if (!ensure_python_arch_operand_is_registered())
+ return false;
+
+ if (!register_class_for_pygobject(dict, G_TYPE_PROXY_OPERAND, type))
return false;
}
diff --git a/plugins/pychrysalide/arch/operands/register.c b/plugins/pychrysalide/arch/operands/register.c
index d032e04..2a48a0f 100644
--- a/plugins/pychrysalide/arch/operands/register.c
+++ b/plugins/pychrysalide/arch/operands/register.c
@@ -112,7 +112,7 @@ static PyObject *py_register_operand_new(PyTypeObject *type, PyObject *args, PyO
if (first_time)
{
- status = register_class_for_dynamic_pygobject(gtype, type, base);
+ status = register_class_for_dynamic_pygobject(gtype, type);
if (!status)
{
@@ -427,7 +427,10 @@ bool ensure_python_register_operand_is_registered(void)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_REGISTER_OPERAND, type, get_python_arch_operand_type()))
+ if (!ensure_python_arch_operand_is_registered())
+ return false;
+
+ if (!register_class_for_pygobject(dict, G_TYPE_REGISTER_OPERAND, type))
return false;
}
diff --git a/plugins/pychrysalide/arch/operands/target.c b/plugins/pychrysalide/arch/operands/target.c
index 76c8269..b8cd536 100644
--- a/plugins/pychrysalide/arch/operands/target.c
+++ b/plugins/pychrysalide/arch/operands/target.c
@@ -115,7 +115,7 @@ static PyObject *py_target_operand_new(PyTypeObject *type, PyObject *args, PyObj
if (first_time)
{
- status = register_class_for_dynamic_pygobject(gtype, type, base);
+ status = register_class_for_dynamic_pygobject(gtype, type);
if (!status)
{
@@ -429,10 +429,13 @@ bool ensure_python_target_operand_is_registered(void)
dict = PyModule_GetDict(module);
+ if (!ensure_python_arch_operand_is_registered())
+ return false;
+
if (!ensure_python_targetable_operand_is_registered())
return false;
- if (!register_class_for_pygobject(dict, G_TYPE_TARGET_OPERAND, type, get_python_arch_operand_type()))
+ if (!register_class_for_pygobject(dict, G_TYPE_TARGET_OPERAND, type))
return false;
}