mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-11-11 03:46:17 +01:00
Remove erroneous markup in GError docs
This commit is contained in:
parent
5a894c3232
commit
5efc8686ee
@ -341,22 +341,19 @@
|
|||||||
* g_set_error() will complain if you pile up errors.
|
* g_set_error() will complain if you pile up errors.
|
||||||
*
|
*
|
||||||
* - By convention, if you return a boolean value indicating success
|
* - By convention, if you return a boolean value indicating success
|
||||||
* then %TRUE means success and %FALSE means failure.
|
* then %TRUE means success and %FALSE means failure. Avoid creating
|
||||||
* <footnote><para>Avoid creating functions which have a boolean
|
* functions which have a boolean return value and a GError parameter,
|
||||||
* return value and a GError parameter, but where the boolean does
|
* but where the boolean does something other than signal whether the
|
||||||
* something other than signal whether the GError is set. Among other
|
* GError is set. Among other problems, it requires C callers to allocate
|
||||||
* problems, it requires C callers to allocate a temporary error. Instead,
|
* a temporary error. Instead, provide a "gboolean *" out parameter.
|
||||||
* provide a "gboolean *" out parameter. There are functions in GLib
|
* There are functions in GLib itself such as g_key_file_has_key() that
|
||||||
* itself such as g_key_file_has_key() that are deprecated because of this.
|
* are deprecated because of this. If %FALSE is returned, the error must
|
||||||
* </para></footnote>
|
* be set to a non-%NULL value. One exception to this is that in situations
|
||||||
* If %FALSE is
|
* that are already considered to be undefined behaviour (such as when a
|
||||||
* returned, the error must be set to a non-%NULL value.
|
|
||||||
* <footnote><para>One exception to this is that in situations 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.
|
||||||
* Instead of checking separately whether the error is set, callers
|
* Instead of checking separately whether the error is set, callers
|
||||||
* should ensure that they do not provoke undefined behaviour, then
|
* should ensure that they do not provoke undefined behaviour, then
|
||||||
* assume that the error will be set on failure.</para></footnote>
|
* assume that the error will be set on failure.
|
||||||
*
|
*
|
||||||
* - A %NULL return value is also frequently used to mean that an error
|
* - A %NULL return value is also frequently used to mean that an error
|
||||||
* occurred. You should make clear in your documentation whether %NULL
|
* occurred. You should make clear in your documentation whether %NULL
|
||||||
|
Loading…
Reference in New Issue
Block a user