[gjs/mcatanzaro/glib-typeof] arg: fix build failure with glib master




commit 6eb35ded6e05be7536f924a891e8e4b1e3539a02
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Tue Feb 2 13:52:35 2021 -0600

    arg: fix build failure with glib master
    
    GLib has changed the definition of glib_typeof in glib!1715. I don't
    fully understand why, but that has broken gjs here. The good news is I
    don't need to understand: here we are using g_steal_pointer on a smart
    pointer that has a release function. It's nicer to just use release
    instead and sidestep the issue.

 gi/arg.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/gi/arg.cpp b/gi/arg.cpp
index 8c91ec25..a1f393aa 100644
--- a/gi/arg.cpp
+++ b/gi/arg.cpp
@@ -763,7 +763,7 @@ gjs_array_to_ptrarray(JSContext   *context,
         array[i] = gjs_arg_get<void*>(&arg);
     }
 
-    *arr_p = g_steal_pointer(&array);
+    *arr_p = array.release();
     return true;
 }
 


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