> + */
> +
> +#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);

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.

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.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/957/files/103d2c535862ae2682022dcfd714c2ffd983c42f..1c4aaa0eb72aa9e3c60cd604d4c20ca5f7dc5c8f#r62338478

Reply via email to