diff options
author | Dan Williams <dcbw@redhat.com> | 2021-05-27 13:29:54 +0200 |
---|---|---|
committer | Emmanuel Fleury <emmanuel.fleury@gmail.com> | 2021-05-28 17:15:46 +0200 |
commit | 9cb1bb0fb24be404734aeaf0f53e745cbea88355 (patch) | |
tree | 0c9e45ea924343420f49a260d639427ea5b7350a /glib/gerror.h | |
parent | 0c8740dc838263008da7be68192065ae7e935bed (diff) | |
download | glib-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.h | 5 |
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, |