[pygobject/pygobject-3-42] Fix type check



commit ca4248e1d808c0792383ef43ace2cd705d75956b
Author: Arjan Molenaar <gaphor gmail com>
Date:   Tue Sep 14 17:24:04 2021 +0200

    Fix type check
    
    Check for required type, instead of negating invalid type.

 gi/pygi-object.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
---
diff --git a/gi/pygi-object.c b/gi/pygi-object.c
index efa2cacb..c97d2dfd 100644
--- a/gi/pygi-object.c
+++ b/gi/pygi-object.c
@@ -266,8 +266,7 @@ pygi_arg_gobject_to_py_called_from_c (GIArgument *arg,
      */
     if (arg->v_pointer != NULL &&
             transfer == GI_TRANSFER_NOTHING &&
-            // Should check for G_IS_OBJECT instead
-            !G_IS_PARAM_SPEC (arg->v_pointer) &&
+            G_IS_OBJECT (arg->v_pointer) &&
             g_object_is_floating (arg->v_pointer)) {
 
         g_object_ref (arg->v_pointer);


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