After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 762937 - Mention that g_clear_error can be used with an "empty" GError
Mention that g_clear_error can be used with an "empty" GError
Status: RESOLVED FIXED
Product: glib
Classification: Platform
Component: docs
unspecified
Other All
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2016-03-01 18:17 UTC by Debarshi Ray
Modified: 2016-03-10 08:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
gerror: Mention that g_clear_error can be used with an "empty" GError (863 bytes, patch)
2016-03-01 18:24 UTC, Debarshi Ray
committed Details | Review

Description Debarshi Ray 2016-03-01 18:17:29 UTC
I noticed this patch lurking on GitHub:
https://github.com/GNOME/glib/pull/9

Given that I have had to look at the g_clear_error source for clarification in the past, it might be worth documenting this clearly.
Comment 1 Debarshi Ray 2016-03-01 18:24:22 UTC
Created attachment 322790 [details] [review]
gerror: Mention that g_clear_error can be used with an "empty" GError
Comment 2 Allison Karlitskaya (desrt) 2016-03-09 18:17:37 UTC
Review of attachment 322790 [details] [review]:

Odd.  I wouldn't have expected that to be allowed.  Fits with other uses of the _clear idiom, though.  Also documents existing behaviour.

Thanks!
Comment 3 Debarshi Ray 2016-03-10 08:13:39 UTC
Comment on attachment 322790 [details] [review]
gerror: Mention that g_clear_error can be used with an "empty" GError

Thanks for taking a look. Pushed to master.