diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-12-15 12:13:22 +0000 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-12-15 12:13:22 +0000 |
commit | 98647a26ee86b3424099537d8f988f32e882e555 (patch) | |
tree | 269c948725ef67ad02b00f2f4380b7cbe540def1 /gi/pygi-info.c | |
parent | e5ce86c51d60980f11f4278ec099888a30a92a3d (diff) | |
parent | b2f8a612ded5c093c5d1fb998c1aa0b1ed8d24fb (diff) | |
download | pygobject-98647a26ee86b3424099537d8f988f32e882e555.tar.gz |
Merge branch 'wrap-struct-find' into 'master'
pygi-info: wrap g_struct_info_find_method() and g_struct_info_find_field()
See merge request GNOME/pygobject!104
Diffstat (limited to 'gi/pygi-info.c')
-rw-r--r-- | gi/pygi-info.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/gi/pygi-info.c b/gi/pygi-info.c index 904b866f..5508001f 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 }, |