diff options
author | Cyrille Bagard <nocbos@gmail.com> | 2023-05-22 20:56:32 (GMT) |
---|---|---|
committer | Cyrille Bagard <nocbos@gmail.com> | 2023-05-22 20:56:32 (GMT) |
commit | e1a2823b5d831349467d309ce42d56055ec9c04f (patch) | |
tree | bc4dd464d10cd379622ceb361398895d59849409 /plugins/elf/python | |
parent | 15fb909bdd8ca0f37dd71da7427ea6bc6bb71cbb (diff) |
Rely on GObject-introspection implementation for some registrations.
Diffstat (limited to 'plugins/elf/python')
-rw-r--r-- | plugins/elf/python/format.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/plugins/elf/python/format.c b/plugins/elf/python/format.c index e0195c4..95eaa9a 100644 --- a/plugins/elf/python/format.c +++ b/plugins/elf/python/format.c @@ -244,18 +244,20 @@ PyTypeObject *get_python_elf_format_type(void) bool register_python_elf_format(PyObject *module) { - PyTypeObject *py_elf_format_type; /* Type Python 'ElfFormat' */ + PyTypeObject *type; /* Type Python 'ElfFormat' */ PyObject *dict; /* Dictionnaire du module */ - py_elf_format_type = get_python_elf_format_type(); + type = get_python_elf_format_type(); dict = PyModule_GetDict(module); - if (!register_class_for_pygobject(dict, G_TYPE_ELF_FORMAT, - py_elf_format_type, get_python_executable_format_type())) + if (!ensure_python_executable_format_is_registered()) return false; - if (!define_python_elf_format_constants(py_elf_format_type)) + if (!register_class_for_pygobject(dict, G_TYPE_ELF_FORMAT, type)) + return false; + + if (!define_python_elf_format_constants(type)) return false; return true; |