summaryrefslogtreecommitdiff
path: root/gi/pygi-info.c
diff options
context:
space:
mode:
Diffstat (limited to 'gi/pygi-info.c')
-rw-r--r--gi/pygi-info.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/gi/pygi-info.c b/gi/pygi-info.c
index 5387e7a..1229d78 100644
--- a/gi/pygi-info.c
+++ b/gi/pygi-info.c
@@ -434,7 +434,6 @@ _g_arg_get_pytype_hint (PyGIBaseInfo *self)
const char *info_name;
PyObject *py_string;
GIBaseInfo *iface = g_type_info_get_interface(&type_info);
- gchar *name;
info_name = g_base_info_get_name (iface);
if (info_name == NULL) {
@@ -442,7 +441,7 @@ _g_arg_get_pytype_hint (PyGIBaseInfo *self)
return PYGLIB_PyUnicode_FromString(g_type_tag_to_string(type_tag));
}
- name = g_strdup_printf("%s.%s",
+ gchar *name = g_strdup_printf("%s.%s",
g_base_info_get_namespace(iface),
info_name);
g_base_info_unref(iface);
@@ -1177,6 +1176,20 @@ _wrap_g_object_info_get_abstract (PyGIBaseInfo *self)
return PyBool_FromLong (is_abstract);
}
+static PyObject *
+_wrap_g_object_info_get_class_struct (PyGIBaseInfo *self)
+{
+ GIBaseInfo *info;
+
+ info = g_object_info_get_class_struct ((GIObjectInfo*)self->info);
+
+ if (info == NULL) {
+ Py_RETURN_NONE;
+ }
+
+ return _pygi_info_new (info);
+}
+
static PyMethodDef _PyGIObjectInfo_methods[] = {
{ "get_parent", (PyCFunction) _wrap_g_object_info_get_parent, METH_NOARGS },
{ "get_methods", (PyCFunction) _wrap_g_object_info_get_methods, METH_NOARGS },
@@ -1185,6 +1198,7 @@ static PyMethodDef _PyGIObjectInfo_methods[] = {
{ "get_constants", (PyCFunction) _wrap_g_object_info_get_constants, METH_NOARGS },
{ "get_vfuncs", (PyCFunction) _wrap_g_object_info_get_vfuncs, METH_NOARGS },
{ "get_abstract", (PyCFunction) _wrap_g_object_info_get_abstract, METH_NOARGS },
+ { "get_class_struct", (PyCFunction) _wrap_g_object_info_get_class_struct, METH_NOARGS },
{ NULL, NULL, 0 }
};