<p>In <a href="https://github.com/geany/geany/pull/957#discussion_r61924638">tagmanager/src/tm_ctags_wrappers.h</a>:</p>
<pre style='color:#555'>> + */
> +
> +#ifndef TM_CTAGS_WRAPPERS
> +#define TM_CTAGS_WRAPPERS
> +
> +#include <glib.h>
> +
> +#include "tm_parser.h"
> +
> +#include "entry.h" /* for sTagEntryInfo */
> +
> +
> +G_BEGIN_DECLS
> +
> +typedef gboolean (*tm_ctags_callback) (const tagEntryInfo *const tag,
> +  gboolean invalidate, void *user_data);
</pre>
<p>It also seems to have a strange signature only targeted at our very specific usage, although it suggest it's meant to be a generic API.  By that I mean the <code>invalidate</code> parameter, that seem more like a step indicator that might be better served as an enum, or at least rather name it something like "initialize" or something more generic.</p>

<p>But maybe</p>

<div class="highlight highlight-source-c"><pre><span class="pl-k">typedef</span> <span class="pl-k">enum</span> TMCtagsParsingStep
{
    TM_CTAGS_PARSING_STEP_INITIALIZE,
    TM_CTAGS_PARSING_STEP_EMIT_TAG,
    <span class="pl-c">// ... possibly _FINALIZE too</span>
}</pre></div>

<p>Or something. Or, if we can be sure <code>tag</code> is never <code>NULL</code> when emitting tags, rely only on this?</p>

<p>Also, documentation on this callback would be great :)</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly or <a href="https://github.com/geany/geany/pull/957/files/103d2c535862ae2682022dcfd714c2ffd983c42f..1c4aaa0eb72aa9e3c60cd604d4c20ca5f7dc5c8f#r61924638">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ4dhOlSJtgIYZRVx4tq5Qun2soIpks5p94qsgaJpZM4Ht-Ad.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/957/files/103d2c535862ae2682022dcfd714c2ffd983c42f..1c4aaa0eb72aa9e3c60cd604d4c20ca5f7dc5c8f#r61924638"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>