From 4ab797332f6b87c3a9eb1b8ebf4e56ef48eaa9e1 Mon Sep 17 00:00:00 2001 From: Ryo Nakano Date: Sat, 24 Aug 2024 13:51:57 +0900 Subject: [PATCH] Fix building with gcc 14 (#2045) --- src/WindowManager.vala | 4 +++- vapi/atk-bridge-2.0.vapi | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/WindowManager.vala b/src/WindowManager.vala index 5d26fbd4..1e67d8fe 100644 --- a/src/WindowManager.vala +++ b/src/WindowManager.vala @@ -388,7 +388,9 @@ namespace Gala { return; } - AtkBridge.adaptor_init (0, {}); + string[] args = {}; + unowned string[] _args = args; + AtkBridge.adaptor_init (ref _args); } private void update_ui_group_size () { diff --git a/vapi/atk-bridge-2.0.vapi b/vapi/atk-bridge-2.0.vapi index 5ab6bfca..d2cd7197 100644 --- a/vapi/atk-bridge-2.0.vapi +++ b/vapi/atk-bridge-2.0.vapi @@ -1,6 +1,6 @@ -[CCode (lower_case_cprefix = "atk_bridge_")] +[CCode (cheader_filename = "atk-bridge.h", lower_case_cprefix = "atk_bridge_")] namespace AtkBridge { - public static int adaptor_init (int argc, char[] argv); + public static int adaptor_init ([CCode (array_length_pos = 0.9)] ref unowned string[] argv); public static void adaptor_cleanup (); public static void set_event_context (GLib.MainContext cnx); }