diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-12-12 22:14:42 +0100 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-12-12 22:14:42 +0100 |
commit | b2f8a612ded5c093c5d1fb998c1aa0b1ed8d24fb (patch) | |
tree | d82ae3d217dc64c63e75f5b5ef457afdebe383b1 /gi/pygi-info.c | |
parent | 339938759f04c0a3a64b96eaa428eb43740dae5e (diff) | |
download | pygobject-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.c | 14 |
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 }, |