[pygobject] replace gpointer by more specific types



commit 85fdd15079ed65b78203e45ff34b19ca33a40670
Author: Arjan Molenaar <gaphor gmail com>
Date:   Fri Aug 20 17:46:38 2021 +0200

    replace gpointer by more specific types

 gi/pygi-closure.c | 6 ++----
 gi/pygi-closure.h | 4 ++--
 2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/gi/pygi-closure.c b/gi/pygi-closure.c
index 5504f241..919365a3 100644
--- a/gi/pygi-closure.c
+++ b/gi/pygi-closure.c
@@ -630,10 +630,8 @@ end:
     PyGILState_Release (py_state);
 }
 
-void _pygi_invoke_closure_free (gpointer data)
+void _pygi_invoke_closure_free (PyGICClosure* invoke_closure)
 {
-    PyGICClosure* invoke_closure = (PyGICClosure *) data;
-
     g_callable_info_free_closure (invoke_closure->info,
                                   invoke_closure->closure);
 
@@ -653,7 +651,7 @@ _pygi_make_native_closure (GICallableInfo* info,
                            PyGIClosureCache *cache,
                            GIScopeType scope,
                            PyObject *py_function,
-                           gpointer py_user_data)
+                           PyObject *py_user_data)
 {
     PyGICClosure *closure;
     ffi_closure *fficlosure;
diff --git a/gi/pygi-closure.h b/gi/pygi-closure.h
index 30da2cf7..8a52b860 100644
--- a/gi/pygi-closure.h
+++ b/gi/pygi-closure.h
@@ -47,13 +47,13 @@ typedef struct _PyGICClosure
 void _pygi_closure_handle (ffi_cif *cif, void *result, void
                            **args, void *userdata);
 
-void _pygi_invoke_closure_free (gpointer user_data);
+void _pygi_invoke_closure_free (PyGICClosure* invoke_closure);
 
 PyGICClosure* _pygi_make_native_closure (GICallableInfo* info,
                                          PyGIClosureCache *cache,
                                          GIScopeType scope,
                                          PyObject *function,
-                                         gpointer user_data);
+                                         PyObject *user_data);
 
 PyGIArgCache *pygi_arg_callback_new_from_info  (GITypeInfo        *type_info,
                                                 GIArgInfo         *arg_info,   /* may be null */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]