[Github-comments] [geany] Use g_return_val_if_fail() to fix build on OS X (#697)

elextr notifications at xxxxx
Thu Oct 15 21:24:03 UTC 2015


> @@ -2000,7 +2000,7 @@ gboolean geany_plugin_register_proxy(GeanyPlugin *plugin, const gchar **extensio
>  	foreach_list(node, active_proxies.head)
>  	{
>  		proxy = node->data;
> -		g_return_if_fail(p != proxy->plugin);
> +		g_return_val_if_fail(p != proxy->plugin, FALSE);

@kugel- based on the comment above the loop, why does this need to print an error if the plugin is already registered?

The `g_return_*` functions are only meant for programming errors, see [here](https://developer.gnome.org/glib/stable/glib-Warnings-and-Assertions.html#glib-Warnings-and-Assertions.description)

---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/697/files#r42182513
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20151015/cda9b770/attachment.html>


More information about the Github-comments mailing list