GNOME Bugzilla – Bug 700725
GIcon: NULLify the `type' out param in the sync methods too
Last modified: 2013-05-28 21:00:54 UTC
Both g_[file|bytes]_icon_load() leave the `type' out parameter untouched, while the async methods g_[file|bytes]_icon_load_finish() always set it to NULL. For consistency's sake we should probably NULLify it in the sync methods too.
Created attachment 244823 [details] [review] gicon: NULLify the `type' out param in the sync methods too Both g_[file|bytes]_icon_load() leave the `type' out parameter untouched, while the async methods g_[file|bytes]_icon_load_finish() always set it to NULL. For consistency's sake NULLify it in the sync methods too.
Review of attachment 244823 [details] [review]: I'm not sure anybody is ever using this (or why it was added in the first place) but this patch is obviously an improvement over the current situation. One nit: in the GFileIcon case, the loading could fail, and a GError be returned. Conventionally, we don't set any out parameters in this case. I would prefer if you reworked this part to only set the out parameter in the successful case.
Created attachment 245492 [details] [review] GIcon: NULLify the `type' out param in the sync methods too Do not nullify `type' if getting the GFileIcon stream failed.
Review of attachment 245492 [details] [review]: Thanks for the update.
The following fix has been pushed: 3382ac9 GIcon: NULLify the `type' out param in the sync methods too Thanks!
Created attachment 245494 [details] [review] GIcon: NULLify the `type' out param in the sync methods too Both g_[file|bytes]_icon_load() leave the `type' out parameter untouched, while the async methods g_[file|bytes]_icon_load_finish() always set it to NULL. For consistency's sake NULLify it in the sync methods too.