summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2021-07-26 17:03:15 -0400
committerMatthias Clasen <mclasen@redhat.com>2021-07-28 22:42:46 -0400
commit19b534f7de7298ae76b173b69e7855ed84a0eb09 (patch)
tree2f432a4764f3cb280fdc1f312f230cf9ee710660 /modules
parent910f23ea19369ead96b4c4c706203eac13985575 (diff)
downloadgtk+-19b534f7de7298ae76b173b69e7855ed84a0eb09.tar.gz
Avoid copying static debug strings
The g_source_set_name calls were showing up as a major source of strdups in our profiles. Avoid that by using new GLib api when available.
Diffstat (limited to 'modules')
-rw-r--r--modules/printbackends/gtkprintbackendcups.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/printbackends/gtkprintbackendcups.c b/modules/printbackends/gtkprintbackendcups.c
index 10a6d80dc4..00ffc00f73 100644
--- a/modules/printbackends/gtkprintbackendcups.c
+++ b/modules/printbackends/gtkprintbackendcups.c
@@ -56,6 +56,7 @@
#include "gtkcupssecretsutils.h"
#include <gtkprintutils.h>
+#include "gtkprivate.h"
#ifdef HAVE_COLORD
#include <colord.h>
@@ -1690,7 +1691,7 @@ cups_request_execute (GtkPrintBackendCups *print_backend,
dispatch = (GtkPrintCupsDispatchWatch *) g_source_new (&_cups_dispatch_watch_funcs,
sizeof (GtkPrintCupsDispatchWatch));
- g_source_set_name (&dispatch->source, "GTK CUPS backend");
+ g_source_set_static_name (&dispatch->source, "GTK CUPS backend");
GTK_NOTE (PRINTING,
g_print ("CUPS Backend: %s <source %p> - Executing cups request on server '%s' and resource '%s'\n", G_STRFUNC, dispatch, request->server, request->resource));