gerror: Clarify reference to g_key_file_has_key() in documentation

It’s not actually deprecated, but it is hard to use. It was briefly
deprecated, but then the deprecation was reversed before a stable
release.

See https://bugzilla.gnome.org/show_bug.cgi?id=650345.

Reported on StackOverflow as
https://stackoverflow.com/q/65505393/2931197.

Signed-off-by: Philip Withnall <pwithnall@endlessos.org>
This commit is contained in:
Philip Withnall 2021-01-04 16:44:12 +00:00
parent bf0430f10e
commit ea6fe7194a

View File

@ -354,7 +354,7 @@
* #GError is set. Among other problems, it requires C callers to allocate * #GError is set. Among other problems, it requires C callers to allocate
* a temporary error. Instead, provide a `gboolean *` out parameter. * a temporary error. Instead, provide a `gboolean *` out parameter.
* There are functions in GLib itself such as g_key_file_has_key() that * There are functions in GLib itself such as g_key_file_has_key() that
* are deprecated because of this. If %FALSE is returned, the error must * are hard to use because of this. If %FALSE is returned, the error must
* be set to a non-%NULL value. One exception to this is that in situations * be set to a non-%NULL value. One exception to this is that in situations
* that are already considered to be undefined behaviour (such as when a * that are already considered to be undefined behaviour (such as when a
* g_return_val_if_fail() check fails), the error need not be set. * g_return_val_if_fail() check fails), the error need not be set.