<p>In <a href="https://github.com/geany/geany/pull/957#discussion_r62338478">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>OK I tried setting passCount=1 at the beginning and there are indeed a few (but really few) cases in the testing projects where the second pass is used. Actually maybe it's OK to leave the multiple passes - users of the library may just decide to ignore subsequent passes. By the way, I made the callback return boolean which is unused now but which in the future might serve as an indicator whether parsing should stop.</p>

<p>Maybe cleaner way than the current boolean flag or your enum would be having multiple callbacks fired at specific occasions. Two should be enough I think - the finalize one shouldn't be necessary because the caller knows when parsing finishes (it's when tm_ctags_parse() returns) and there's no need for it between passes because it would just be called immediately before the initialize step.</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#r62338478">view it on GitHub</a><img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ6hYSuofeu0KfnzJWyq1kkkFlGlCks5p-1LtgaJpZM4Ht-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#r62338478"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>