summaryrefslogtreecommitdiff
path: root/plugins/pe/python
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/pe/python
parent15fb909bdd8ca0f37dd71da7427ea6bc6bb71cbb (diff)
Rely on GObject-introspection implementation for some registrations.
Diffstat (limited to 'plugins/pe/python')
-rw-r--r--plugins/pe/python/format.c7
-rw-r--r--plugins/pe/python/routine.c8
2 files changed, 11 insertions, 4 deletions
diff --git a/plugins/pe/python/format.c b/plugins/pe/python/format.c
index d295da4..4bbb99a 100644
--- a/plugins/pe/python/format.c
+++ b/plugins/pe/python/format.c
@@ -115,7 +115,7 @@ static PyObject *py_pe_format_new(PyTypeObject *type, PyObject *args, PyObject *
if (first_time)
{
- status = register_class_for_dynamic_pygobject(gtype, type, base);
+ status = register_class_for_dynamic_pygobject(gtype, type);
if (!status)
{
@@ -539,7 +539,10 @@ bool register_python_pe_format(PyObject *module)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_PE_FORMAT, type, get_python_executable_format_type()))
+ if (!ensure_python_executable_format_is_registered())
+ return false;
+
+ if (!register_class_for_pygobject(dict, G_TYPE_PE_FORMAT, type))
return false;
if (!define_python_pe_format_constants(type))
diff --git a/plugins/pe/python/routine.c b/plugins/pe/python/routine.c
index cebeb2a..fd30e6d 100644
--- a/plugins/pe/python/routine.c
+++ b/plugins/pe/python/routine.c
@@ -221,7 +221,9 @@ bool register_python_pe_exported_routine(PyObject *module)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_PE_EXPORTED_ROUTINE, type, get_python_binary_routine_type()))
+ /* TODO : ensure get_python_binary_routine_type() */
+
+ if (!register_class_for_pygobject(dict, G_TYPE_PE_EXPORTED_ROUTINE, type))
return false;
if (!define_python_pe_exported_routine_constants(type))
@@ -461,7 +463,9 @@ bool register_python_pe_imported_routine(PyObject *module)
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_PE_IMPORTED_ROUTINE, type, get_python_pe_exported_routine_type()))
+ /* TODO : ensure get_python_pe_exported_routine_type() */
+
+ if (!register_class_for_pygobject(dict, G_TYPE_PE_IMPORTED_ROUTINE, type))
return false;
return true;