[Github-comments] [geany] Proxy plugins (#629)
Colomban Wendling
notifications at xxxxx
Mon Oct 5 17:28:32 UTC 2015
> +
> + /* 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;
> +
> + ext += 1;
> + /* O(n*m), (m being extensions per proxy) doesn't scale very well in theory
> + * but not a problem in practice yet */
> + foreach_list(node, active_proxies.head)
> + {
> + PluginProxy *proxy = node->data;
> + if (utils_str_casecmp(ext, proxy->extension) != 0)
This test is inverted, should be `==` It only "works" with C plugins by chance because they ship with a `.la` and for some reason loading this one also works.
Doesn't work with [geanypy port](https://github.com/kugel-/geany-plugins/commit/9c27df004f1c0906970da605d6c0ffd89d0a2fed), no python plugins show up -- and geanypy probes and tried to load all C plugins.
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/629/files#r41171947
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20151005/7e9014ce/attachment.html>
More information about the Github-comments
mailing list