[pygobject/meson.msvc: 1/4] gi/pygi-closure.c: Cast arg->v_pointer as needed



commit 1afb944c308a9c382522a9aca68637f80ecb6103
Author: Chun-wei Fan <fanchunwei src gnome org>
Date:   Wed Sep 26 17:24:25 2018 +0800

    gi/pygi-closure.c: Cast arg->v_pointer as needed
    
    Just cast to ffi_arg, which more or less corresponds to a pointer type
    as arg->v_pointer is a gpointer by itself.  Fixes compiler
    errors/warnings when we force-include msvc_recommended_pragmas.h

 gi/pygi-closure.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/gi/pygi-closure.c b/gi/pygi-closure.c
index 3299d1be..136eec64 100644
--- a/gi/pygi-closure.c
+++ b/gi/pygi-closure.c
@@ -104,14 +104,14 @@ _pygi_closure_assign_pyobj_to_retval (gpointer retval,
                     *(ffi_arg *) retval = arg->v_uint;
                     break;
                 default:
-                    *(ffi_arg *) retval = arg->v_pointer;
+                    *(ffi_arg *) retval = (ffi_arg) arg->v_pointer;
                     break;
                 }
 
                 break;
             }
         default:
-            *(ffi_arg *) retval = arg->v_pointer;
+            *(ffi_arg *) retval = (ffi_arg) arg->v_pointer;
             break;
       }
 }


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