mirror of
https://github.com/irssi/irssi.git
synced 2026-08-16 23:22:16 +02:00
replace str->str & g_string_free with g_string_free_and_steal
solving unused warning in GLib 2.76
This commit is contained in:
parent
995e77c30d
commit
8eee36d1ea
20 changed files with 73 additions and 78 deletions
|
|
@ -26,6 +26,15 @@
|
|||
#define CONFIG_INDENT_SIZE 2
|
||||
static const char *indent_block = " "; /* needs to be the same size as CONFIG_INDENT_SIZE! */
|
||||
|
||||
#if GLIB_CHECK_VERSION(2, 76, 0)
|
||||
/* nothing */
|
||||
#else
|
||||
static gchar *g_string_free_and_steal(GString *string)
|
||||
{
|
||||
return g_string_free(string, FALSE);
|
||||
}
|
||||
#endif
|
||||
|
||||
/* write needed amount of indentation to the start of the line */
|
||||
static int config_write_indent(CONFIG_REC *rec)
|
||||
{
|
||||
|
|
@ -108,8 +117,7 @@ static char *config_escape_string(const char *text)
|
|||
|
||||
g_string_append_c(str, '"');
|
||||
|
||||
ret = str->str;
|
||||
g_string_free(str, FALSE);
|
||||
ret = g_string_free_and_steal(str);
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue