summaryrefslogtreecommitdiff
path: root/glib/gerror.h
diff options
context:
space:
mode:
authorDan Williams <dcbw@redhat.com>2021-05-27 13:29:54 +0200
committerEmmanuel Fleury <emmanuel.fleury@gmail.com>2021-05-28 17:15:46 +0200
commit9cb1bb0fb24be404734aeaf0f53e745cbea88355 (patch)
tree0c9e45ea924343420f49a260d639427ea5b7350a /glib/gerror.h
parent0c8740dc838263008da7be68192065ae7e935bed (diff)
downloadglib-9cb1bb0fb24be404734aeaf0f53e745cbea88355.tar.gz
Add g_prefix_error_literal()
Because sometimes you don't want a lone "%s", and you don't want the compiler yelling at you about format strings that don't have any format in them. Closes #663
Diffstat (limited to 'glib/gerror.h')
-rw-r--r--glib/gerror.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/glib/gerror.h b/glib/gerror.h
index 6431d5b6c..bc9c03a91 100644
--- a/glib/gerror.h
+++ b/glib/gerror.h
@@ -244,6 +244,11 @@ void g_prefix_error (GError **err,
const gchar *format,
...) G_GNUC_PRINTF (2, 3);
+/* if (err) prefix the string to the ->message */
+GLIB_AVAILABLE_IN_2_70
+void g_prefix_error_literal (GError **err,
+ const gchar *prefix);
+
/* g_propagate_error then g_error_prefix on dest */
GLIB_AVAILABLE_IN_ALL
void g_propagate_prefixed_error (GError **dest,