<p>This is useful if a plugin registers i.e. GTypes from its<br>
geany_load_module(), i.e. to implement plugin functions as GObject<br>
class methods.</p>

<p>The implementation can be considered a slight hack, but we need the<br>
module to be know already in geany_load_module(), which is called too<br>
early for the normal process to set it.</p>

<p>Closes <a href="https://github.com/geany/geany/pull/719" class="issue-link" title="plugins: pass GModule * to geany_load_module()">#719</a>.</p>

<hr>

<p>This is the "hackish" way as mentioned in <a href="https://github.com/geany/geany/pull/719#issuecomment-152766371" class="issue-link" title="plugins: pass GModule * to geany_load_module()">#719 (comment)</a>, but it actually looks quite better than altering the documentation like with <a href="https://github.com/geany/geany/pull/759" class="issue-link" title="Document a case where plugin_module_make_resident() cannot be used">#759</a>, and it's more convenient for users.</p>

<p>It's a trivial change, and tested working.</p>

<p><a href="https://github.com/kugel-" class="user-mention">@kugel-</a> how do you feel about this?</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/geany/geany/pull/760'>https://github.com/geany/geany/pull/760</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>Allow calls to plugin_module_make_resident() from geany_load_module()</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/760/files#diff-0">src/plugindata.h</a>
    (1)
  </li>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/760/files#diff-1">src/plugins.c</a>
    (4)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/geany/geany/pull/760.patch'>https://github.com/geany/geany/pull/760.patch</a></li>
  <li><a href='https://github.com/geany/geany/pull/760.diff'>https://github.com/geany/geany/pull/760.diff</a></li>
</ul>

<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/760">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJxs_ihHhuUXxC-3l-qPxvzpNh5h-ks5pF8kygaJpZM4GidB1.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/760"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>