I was thinking a proxy written in C++ could cause Geany to call it on a subplugin? (but I don't know the details of proxy and geany interaction).
Probably not, because geany_load_module()
is the builtin Geany API, a proxy plugin is likely to have it own, and even then, only one place should call that function inside plugins.
As best I can tell its UB. […]
Yeah I'd imagine. Though, I'm wondering what's worse: not checking signature at all, or requiring authors of C++ plugins to carefully not throw any exception (from inside a function that is highly unlikely to contain much C++ code)? If really the author meant to add noexcept
, she must then be aware of the problem and properly handle exceptions anyway, as IIUC all this is merely a runtime check that leads to program abortion.
An alternative solution could be something like this:
#ifdef __cplusplus /* >= 2011 */
gboolean geany_load_module(GeanyPlugin *plugin) noexcept;
#else
gboolean geany_load_module(GeanyPlugin *plugin);
#endif
So authors of C++ plugins are forced to consider the issue. But that breaks C++ API.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.