diff options
| author | Christoph Reiter <reiter.christoph@gmail.com> | 2018-03-31 07:55:38 +0200 |
|---|---|---|
| committer | Christoph Reiter <reiter.christoph@gmail.com> | 2018-03-31 10:16:20 +0200 |
| commit | 55cc485fb5b9ff41d3aa63a2023390a120ad2fa3 (patch) | |
| tree | 6866d4f26904d193341d3ee0f01f8c4cbc8da1b8 /gi/pygi-boxed.c | |
| parent | 9739ccee4ee3508cea9086f33daebb9d8f10a6fd (diff) | |
| download | pygobject-55cc485fb5b9ff41d3aa63a2023390a120ad2fa3.tar.gz | |
pygi-boxed: clean up function names
Diffstat (limited to 'gi/pygi-boxed.c')
| -rw-r--r-- | gi/pygi-boxed.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/gi/pygi-boxed.c b/gi/pygi-boxed.c index 1e846093..eaf56d69 100644 --- a/gi/pygi-boxed.c +++ b/gi/pygi-boxed.c @@ -28,7 +28,7 @@ #include <girepository.h> static void -_boxed_dealloc (PyGIBoxed *self) +boxed_dealloc (PyGIBoxed *self) { Py_TYPE (self)->tp_free ((PyObject *)self); } @@ -55,7 +55,7 @@ boxed_del (PyGIBoxed *self) } void * -_pygi_boxed_alloc (GIBaseInfo *info, gsize *size_out) +pygi_boxed_alloc (GIBaseInfo *info, gsize *size_out) { gpointer boxed = NULL; gsize size = 0; @@ -93,7 +93,7 @@ _pygi_boxed_alloc (GIBaseInfo *info, gsize *size_out) } static PyObject * -_boxed_new (PyTypeObject *type, +boxed_new (PyTypeObject *type, PyObject *args, PyObject *kwargs) { @@ -110,12 +110,12 @@ _boxed_new (PyTypeObject *type, return NULL; } - boxed = _pygi_boxed_alloc (info, &size); + boxed = pygi_boxed_alloc (info, &size); if (boxed == NULL) { goto out; } - self = (PyGIBoxed *) _pygi_boxed_new (type, boxed, TRUE, size); + self = (PyGIBoxed *) pygi_boxed_new (type, boxed, TRUE, size); if (self == NULL) { g_slice_free1 (size, boxed); goto out; @@ -131,7 +131,7 @@ out: } static int -_boxed_init (PyObject *self, +boxed_init (PyObject *self, PyObject *args, PyObject *kwargs) { @@ -151,10 +151,10 @@ _boxed_init (PyObject *self, PYGLIB_DEFINE_TYPE("gi.Boxed", PyGIBoxed_Type, PyGIBoxed); PyObject * -_pygi_boxed_new (PyTypeObject *type, - gpointer boxed, - gboolean free_on_dealloc, - gsize allocated_slice) +pygi_boxed_new (PyTypeObject *type, + gpointer boxed, + gboolean free_on_dealloc, + gsize allocated_slice) { PyGIBoxed *self; @@ -187,13 +187,13 @@ _pygi_boxed_new (PyTypeObject *type, } static PyObject * -_pygi_boxed_get_free_on_dealloc(PyGIBoxed *self, void *closure) +boxed_get_free_on_dealloc(PyGIBoxed *self, void *closure) { return PyBool_FromLong( ((PyGBoxed *)self)->free_on_dealloc ); } /** - * _pygi_boxed_copy_in_place: + * pygi_boxed_copy_in_place: * * Replace the boxed pointer held by this wrapper with a boxed copy * freeing the previously held pointer (when free_on_dealloc is TRUE). @@ -202,7 +202,7 @@ _pygi_boxed_get_free_on_dealloc(PyGIBoxed *self, void *closure) * longer than the duration of a callback it was passed to. */ void -_pygi_boxed_copy_in_place (PyGIBoxed *self) +pygi_boxed_copy_in_place (PyGIBoxed *self) { PyGBoxed *pygboxed = (PyGBoxed *)self; gpointer ptr = pyg_boxed_get_ptr (self); @@ -217,7 +217,7 @@ _pygi_boxed_copy_in_place (PyGIBoxed *self) } static PyGetSetDef pygi_boxed_getsets[] = { - { "_free_on_dealloc", (getter)_pygi_boxed_get_free_on_dealloc, (setter)0 }, + { "_free_on_dealloc", (getter)boxed_get_free_on_dealloc, (setter)0 }, { NULL, 0, 0 } }; @@ -235,9 +235,9 @@ pygi_boxed_register_types (PyObject *m) Py_TYPE(&PyGIBoxed_Type) = &PyType_Type; g_assert (Py_TYPE (&PyGBoxed_Type) != NULL); PyGIBoxed_Type.tp_base = &PyGBoxed_Type; - PyGIBoxed_Type.tp_new = (newfunc) _boxed_new; - PyGIBoxed_Type.tp_init = (initproc) _boxed_init; - PyGIBoxed_Type.tp_dealloc = (destructor) _boxed_dealloc; + PyGIBoxed_Type.tp_new = (newfunc) boxed_new; + PyGIBoxed_Type.tp_init = (initproc) boxed_init; + PyGIBoxed_Type.tp_dealloc = (destructor) boxed_dealloc; PyGIBoxed_Type.tp_flags = (Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE); PyGIBoxed_Type.tp_getset = pygi_boxed_getsets; PyGIBoxed_Type.tp_methods = boxed_methods; |
