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 <pwithnall@gnome.org>
This commit is contained in:
Philip Withnall 2024-10-22 12:45:20 +01:00
parent 05fb05b49b
commit 1755024caf
No known key found for this signature in database
GPG Key ID: C5C42CFB268637CA

View File

@ -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;