summaryrefslogtreecommitdiff
path: root/gi/pygi-info.c
diff options
context:
space:
mode:
authorChristoph Reiter <reiter.christoph@gmail.com>2018-12-12 22:14:42 +0100
committerChristoph Reiter <reiter.christoph@gmail.com>2018-12-12 22:14:42 +0100
commitb2f8a612ded5c093c5d1fb998c1aa0b1ed8d24fb (patch)
treed82ae3d217dc64c63e75f5b5ef457afdebe383b1 /gi/pygi-info.c
parent339938759f04c0a3a64b96eaa428eb43740dae5e (diff)
downloadpygobject-b2f8a612ded5c093c5d1fb998c1aa0b1ed8d24fb.tar.gz
pygi-info: wrap g_struct_info_find_method() and g_struct_info_find_field()
Because why not.
Diffstat (limited to 'gi/pygi-info.c')
-rw-r--r--gi/pygi-info.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/gi/pygi-info.c b/gi/pygi-info.c
index 4fca825a..e9456f82 100644
--- a/gi/pygi-info.c
+++ b/gi/pygi-info.c
@@ -1307,9 +1307,23 @@ _wrap_g_struct_info_is_foreign (PyGIBaseInfo *self)
return pygi_gboolean_to_py (g_struct_info_is_foreign (self->info));
}
+static PyObject *
+_wrap_g_struct_info_find_method (PyGIBaseInfo *self, PyObject *py_name)
+{
+ return _get_child_info_by_name (self, py_name, g_struct_info_find_method);
+}
+
+static PyObject *
+_wrap_g_struct_info_find_field (PyGIBaseInfo *self, PyObject *py_name)
+{
+ return _get_child_info_by_name (self, py_name, g_struct_info_find_field);
+}
+
static PyMethodDef _PyGIStructInfo_methods[] = {
{ "get_fields", (PyCFunction) _wrap_g_struct_info_get_fields, METH_NOARGS },
+ { "find_field", (PyCFunction) _wrap_g_struct_info_find_field, METH_O },
{ "get_methods", (PyCFunction) _wrap_g_struct_info_get_methods, METH_NOARGS },
+ { "find_method", (PyCFunction) _wrap_g_struct_info_find_method, METH_O },
{ "get_size", (PyCFunction) _wrap_g_struct_info_get_size, METH_NOARGS },
{ "get_alignment", (PyCFunction) _wrap_g_struct_info_get_alignment, METH_NOARGS },
{ "is_gtype_struct", (PyCFunction) _wrap_g_struct_info_is_gtype_struct, METH_NOARGS },