diff options
author | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:49:46 +0900 |
---|---|---|
committer | DongHun Kwak <dh0128.kwak@samsung.com> | 2017-07-12 08:49:49 +0900 |
commit | 834a4dcd043de07e4b8670c47ff647f58da5f5e4 (patch) | |
tree | 83124c8c6fb305f76988f61aee231044ca5b801a /gi/pygi-info.c | |
parent | cf76ccccc8e2364c85afba6ea59645fc188c3d19 (diff) | |
download | pygobject2-834a4dcd043de07e4b8670c47ff647f58da5f5e4.tar.gz pygobject2-834a4dcd043de07e4b8670c47ff647f58da5f5e4.tar.bz2 pygobject2-834a4dcd043de07e4b8670c47ff647f58da5f5e4.zip |
Imported Upstream version 3.9.1
Change-Id: Iea08d370f802808b02274c20102ee1635ee58f78
Signed-off-by: DongHun Kwak <dh0128.kwak@samsung.com>
Diffstat (limited to 'gi/pygi-info.c')
-rw-r--r-- | gi/pygi-info.c | 18 |
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 } }; |