From 43669f58f3381dd009b84c8f92ac56462f4f2932 Mon Sep 17 00:00:00 2001 From: Ben Pfaff Date: Fri, 3 Nov 2023 17:29:14 -0700 Subject: [PATCH] Unconditionally replace g_string_free_and_steal(). It's a persistent problem and I don't understand why. I hope this fixes the issue for good. Thanks to Ali Alhaidary for reporting this bug. Bug #64848. --- src/ui/gui/include/glib.in.h | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/ui/gui/include/glib.in.h b/src/ui/gui/include/glib.in.h index b87cb97c1e..94f9710886 100644 --- a/src/ui/gui/include/glib.in.h +++ b/src/ui/gui/include/glib.in.h @@ -49,12 +49,14 @@ g_memdup2 (gconstpointer mem, } #endif -#if !GLIB_CHECK_VERSION(2, 76, 0) +/* g_string_free_and_steal() was introduced in glib 2.76 but it is a persistent + problem. I don't understand why. It's easiest to just unconditionally + replace it. */ +#define g_string_free_and_steal rpl_g_string_free_and_steal static inline gchar * -g_string_free_and_steal (GString *string) +rpl_g_string_free_and_steal (GString *string) { - return g_string_free (string, FALSE); + return (g_string_free) (string, FALSE); } -#endif #endif /* PSPP_GLIB_H */ -- 2.30.2