Ejemplo n.º 1
0
static void
_ccallback_dealloc (PyGICCallback *self)
{
    g_base_info_unref ( (GIBaseInfo *)self->info);

    if (self->cache != NULL) {
        pygi_callable_cache_free ( (PyGICallableCache *)self->cache);
    }

    Py_TYPE (self)->tp_free ((PyObject *)self);
}
Ejemplo n.º 2
0
void _pygi_invoke_closure_free (gpointer data)
{
    PyGICClosure* invoke_closure = (PyGICClosure *) data;

    g_callable_info_free_closure (invoke_closure->info,
                                  invoke_closure->closure);

    if (invoke_closure->info)
        g_base_info_unref ( (GIBaseInfo*) invoke_closure->info);

    if (invoke_closure->cache != NULL)
        pygi_callable_cache_free ((PyGICallableCache *) invoke_closure->cache);

    _pygi_invoke_closure_clear_py_data(invoke_closure);

    g_slice_free (PyGICClosure, invoke_closure);
}