[Github-comments] [geany/geany] TM cleanups (#957)

Colomban Wendling notifications at xxxxx
Tue May 3 17:49:32 UTC 2016


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

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 `invalidate` 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.

But maybe
```C
typedef enum TMCtagsParsingStep
{
	TM_CTAGS_PARSING_STEP_INITIALIZE,
	TM_CTAGS_PARSING_STEP_EMIT_TAG,
	// ... possibly _FINALIZE too
}
```
Or something. Or, if we can be sure `tag` is never `NULL` when emitting tags, rely only on this?

Also, documentation on this callback would be great :)

---
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#r61924638
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20160503/e2ff9a47/attachment.html>


More information about the Github-comments mailing list