From 1755024caf640f9d4f806c19f640fc8fe561c003 Mon Sep 17 00:00:00 2001 From: Philip Withnall Date: Tue, 22 Oct 2024 12:45:20 +0100 Subject: [PATCH] gutf8: Factor out complex type signature into a typedef As suggested by Michael Catanzaro, this should make the return type of the resolve function a bit easier for people to parse. This introduces no functional changes. Signed-off-by: Philip Withnall --- glib/gutf8.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/glib/gutf8.c b/glib/gutf8.c index 45a2801aa..b245d5ffd 100644 --- a/glib/gutf8.c +++ b/glib/gutf8.c @@ -1886,7 +1886,12 @@ g_utf8_validate_valgrind (const char *str, return g_utf8_validate_len (str, max_len, end); } -static gboolean (*resolve_g_utf8_validate (void)) (const char *, gssize, const char **) +typedef gboolean (*GUtf8ValidateFunc) (const char *str, + gssize max_len, + const char **end); + +static GUtf8ValidateFunc +resolve_g_utf8_validate (void) { if (RUNNING_ON_VALGRIND) return g_utf8_validate_valgrind;