summaryrefslogtreecommitdiff
path: root/plugins/javadesc/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/javadesc/python
parent15fb909bdd8ca0f37dd71da7427ea6bc6bb71cbb (diff)
Rely on GObject-introspection implementation for some registrations.
Diffstat (limited to 'plugins/javadesc/python')
-rw-r--r--plugins/javadesc/python/demangler.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/plugins/javadesc/python/demangler.c b/plugins/javadesc/python/demangler.c
index 3a972cee..62b24c7 100644
--- a/plugins/javadesc/python/demangler.c
+++ b/plugins/javadesc/python/demangler.c
@@ -142,15 +142,17 @@ PyTypeObject *get_python_java_demangler_type(void)
bool register_python_java_demangler(PyObject *module)
{
- PyTypeObject *py_java_demangler_type; /* Type Python 'JavaDemangler' */
+ PyTypeObject *type; /* Type Python 'JavaDemangler' */
PyObject *dict; /* Dictionnaire du module */
- py_java_demangler_type = get_python_java_demangler_type();
+ type = get_python_java_demangler_type();
dict = PyModule_GetDict(module);
- if (!register_class_for_pygobject(dict, G_TYPE_JAVA_DEMANGLER,
- py_java_demangler_type, get_python_compiler_demangler_type()))
+ if (!ensure_python_compiler_demangler_is_registered())
+ return false;
+
+ if (!register_class_for_pygobject(dict, G_TYPE_JAVA_DEMANGLER, type))
return false;
return true;