> + plugin_free((Plugin *) item->data);
> + }
> + item = next;
> + }
> +}
> +
> +
> +/* Returns true if the removal was successful (=> never for non-proxies) */
> +static gboolean unregister_proxy(Plugin *proxy)
> +{
> + gboolean is_proxy = FALSE;
> + GList *node;
> +
> + /* Remove the proxy from the proxy list first. It might appear more than once (once
> + * for each extension), but if it doesn't appear at all it's not actually a proxy */
> + foreach_list_safe(node, active_proxies.head)
https://github.com/geany/geany/pull/629/files#diff-315e8720481183cf75b604b9…
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/629/files#r41068879
> + plugin_free((Plugin *) item->data);
> + }
> + item = next;
> + }
> +}
> +
> +
> +/* Returns true if the removal was successful (=> never for non-proxies) */
> +static gboolean unregister_proxy(Plugin *proxy)
> +{
> + gboolean is_proxy = FALSE;
> + GList *node;
> +
> + /* Remove the proxy from the proxy list first. It might appear more than once (once
> + * for each extension), but if it doesn't appear at all it's not actually a proxy */
> + foreach_list_safe(node, active_proxies.head)
Which other place?
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/629/files#r41067827
> @@ -830,25 +1011,80 @@ static gboolean check_plugin_path(const gchar *fname)
> }
>
>
> +/* Retuns NULL if this ain't a plugin,
> + * otherwise it returns the appropriate PluginProxy instance to load it */
> +static PluginProxy* is_plugin(const gchar *file)
> +{
> + GList *node;
> + const gchar *ext;
> +
> + /* extract file extension to avoid g_str_has_suffix() in the loop */
> + ext = (const gchar *)strrchr(file, '.');
> + if (ext == NULL)
> + return FALSE;
> + /* ensure the dot is really part of the filename */
> + else if (strchr(ext, G_DIR_SEPARATOR) != NULL)
> + return FALSE;
Hum, didn't I already asked whether we shouldn't check both `\` and `/` on Windows here too?
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/629/files#r41065079
> + plugin_free((Plugin *) item->data);
> + }
> + item = next;
> + }
> +}
> +
> +
> +/* Returns true if the removal was successful (=> never for non-proxies) */
> +static gboolean unregister_proxy(Plugin *proxy)
> +{
> + gboolean is_proxy = FALSE;
> + GList *node;
> +
> + /* Remove the proxy from the proxy list first. It might appear more than once (once
> + * for each extension), but if it doesn't appear at all it's not actually a proxy */
> + foreach_list_safe(node, active_proxies.head)
prev function does the exact same thing without a macro. it would be more consistent using the same technique in the 2 places (either one is OK with me, @codebrainz would prefer previous func's one)
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/629/files#r41064889
> +{
> + PluginContext *data;
> + gchar fmt[] = "item%d";
> + gint i = 0;
> + gchar *text;
> +
> + data = (PluginContext *) pdata;
> +
> + /* Normally, you would instruct the VM/interpreter to call into the actual plugin. The
> + * plugin would be identified by pdata. Because there is no interpreter for
> + * .ini files we do it inline, as this is just a demo */
> + data->help_text = g_key_file_get_locale_string(data->file, "Help", "text", NULL, NULL);
> + while (TRUE)
> + {
> + GtkWidget *item;
> + gchar *key = g_strdup_printf(fmt, i++);
(weird, I would think I already mentioned this earlier)
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/629/files#r41062661
> +{
> + PluginContext *data;
> + gchar fmt[] = "item%d";
> + gint i = 0;
> + gchar *text;
> +
> + data = (PluginContext *) pdata;
> +
> + /* Normally, you would instruct the VM/interpreter to call into the actual plugin. The
> + * plugin would be identified by pdata. Because there is no interpreter for
> + * .ini files we do it inline, as this is just a demo */
> + data->help_text = g_key_file_get_locale_string(data->file, "Help", "text", NULL, NULL);
> + while (TRUE)
> + {
> + GtkWidget *item;
> + gchar *key = g_strdup_printf(fmt, i++);
`fmt` should be the string literal itself. the variable is not needed, and it prevents GCC from checking the format string.
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/629/files#r41062535