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

Colomban Wendling notifications at xxxxx
Tue May 3 20:26:20 UTC 2016


> +
> +
> +void tm_parser_verify_type_mappings(void)
> +{
> +	gsize parser_map_size = sizeof(parser_map) / sizeof(TMParserMap);
> +	TMParserType lang;
> +
> +	if (TM_PARSER_COUNT > tm_ctags_get_lang_count())
> +	{
> +		g_warning("More parsers defined in Geany than in ctags");
> +		return;
> +	}
> +
> +	if (parser_map_size != TM_PARSER_COUNT)
> +	{
> +		g_warning("Different number of parsers and tag type mappings");

this one could be a static assertion, would be awesome :)
```c
G_STATIC_ASSERT(G_N_ELEMENTS(parser_map == TM_PARSER_COUNT);
```

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


More information about the Github-comments mailing list