[Github-comments] [geany] Proxy plugins (#629)
Thomas Martitz
notifications at xxxxx
Tue Sep 8 13:36:01 UTC 2015
> @@ -830,6 +1000,52 @@ 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)
> +{
> + PluginProxy *proxy;
> + const gchar *tmp;
> + gint i;
> +
> + /* extract file extension to avoid g_str_has_suffix() in the loop */
> + tmp = (const gchar *)g_utf8_strrchr(file, -1, '.');
> + if (tmp == NULL)
> + return FALSE;
> + /* ensure the dot is really part of the filename */
> + else if (strchr(tmp, G_DIR_SEPARATOR) != NULL)
Oh look. I used strchr(). I'm inconsistent with myself :/
Regarding the /, do we have to do this everywhere? I didn't notice an #ifdef hell about that yet
---
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/629/files#r38925433
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20150908/6fe4b70a/attachment.html>
More information about the Github-comments
mailing list