To minimize boilerplate. You can view, comment on, or merge this pull request online at:
https://github.com/geany/geany/pull/1230
-- Commit Summary --
* Improve template command error message * Add GEANY_REGISTER_PLUGIN() macro * Convert demo plugin to use more modern API
-- File Changes --
M plugins/demoplugin.c (33) M src/plugindata.h (63) M src/templates.c (5)
-- Patch Links --
https://github.com/geany/geany/pull/1230.patch https://github.com/geany/geany/pull/1230.diff
I'm not fond of the name (`GEANY_REGISTER_PLUGIN` vs `GEANY_PLUGIN_REGISTER` is likely to lead to confusion). Also, this API is kinda nice, but not extensible, which was one of the reasons why to fill a structure.
Also, this API is kinda nice, but not extensible, which was one of the reasons why to fill a structure.
What's going to be added? AFAIK these functions haven't changed ever, even the new API changes could've been hidden behind this same kind of macro since the functions never changed. Filling a structure just adds noise the registration API for the most part.
Also, since it's just a macro, odd-ball plugins who need more are free to do things manually. As for the name, it needs to be unique and make sense, which is why I chose that name.
@codebrainz pushed 2 commits.
74b4b37 Add GEANY_REGISTER_PROXY_PLUGIN() macro cddeb19 Make demoproxy plugin use new macro
Added likewise for proxy plugins.
@codebrainz pushed 1 commit.
68d278c Don't take literal initializer argument
github-comments@lists.geany.org