Am 31.10.2015 um 20:23 schrieb Colomban Wendling:<br>
><br>
> Makes some sense, although it would be technically possible to simply <br>
> set |subplugin->priv->proxy_data = module| in |plugin_load_gmodule()| <br>
> before calling |geany_load_module()|.<br>
><br>
<br>
Yea, I considered this as well. But I didn't like it as much (seems more <br>
like a hack to me) and earlier versions of new_hooks already had the <br>
parameter.<br>
<br>
<br>
> If we go the additional arg way like this (which seem mostly OK to me, <br>
> see below), we need to document |plugin_module_make_resident()| <br>
> doesn't work with new-style API in |load()|, and probably deprecate <br>
> it. Advertizing both functions depending on the call site seems overly <br>
> odd to me.<br>
><br>
<br>
It is documented, since the documentation for |geany_load_module() has a <br>
whitelist of API function that are allowed. I don't have a problem with <br>
deprecating ||plugin_module_make_resident() and I would rather not <br>
extend the whitelist without good reason. To me it's useless because <br>
it's a plain wrapper around a glib function. However, it's needed for <br>
legacy plugins which do not know about their GModule*.|<br>
<br>
> However, most plugins probably only need to make the module resident <br>
> after |init()| -- as |load()| will often not create |GType|s; and if a <br>
> lot of plugins end up being resident when loaded (and all installed <br>
> plugins gets "loaded"), it might have a largish and unwanted memory <br>
> impact.<br>
><br>
<br>
Yes, it would be better to do it in init() for best efficiency but IMO <br>
we should allow for doing it in |geany_load_module() too, might be <br>
necessary and/or more convenient for some plugins.<br>
<br>
The difference between is normally not a problem, because it only kicks <br>
in after opening the PM dialog (where |||geany_load_module() is called <br>
for every plugin)|. For normal sessions ||geany_load_module() is only <br>
called for active ones on startup.<br>
|<br>


<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/pull/719#issuecomment-152766371">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ5vD5J8Z3st4QYuqzTSQg8o4zoQQks5pBRKigaJpZM4GZg2a.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/pull/719#issuecomment-152766371"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>