@b4n commented on this pull request.


In src/tagmanager/tm_source_file.c:

> @@ -436,7 +443,6 @@ static TMTag *new_tag_from_tags_file(TMSourceFile *file, FILE *fp, TMParserType
 			result = init_tag_from_file_alt(tag, file, fp);
 			break;
 		case TM_FILE_FORMAT_CTAGS:
-			result = init_tag_from_file_ctags(tag, file, fp, mode);

might be worth a g_warn_if_reached()


In src/tagmanager/tm_source_file.c:

> +		fclose(fp);  /* the readtags library opens the file by itself */
+		read_ctags_file(tags_file, mode, file_tags);

Doesn't the # format=ctags confuse this parser? I didn't try this yet, but it feels like it should:

doesn't this happen?

Agreed this header it not necessary (and actually with supporting detection with some pseudo-tags probably not advisable), but it should either work, or we shouldn't pretend it still does.


In src/tagmanager/tm_source_file.c:

>  {
-	gchar buf[BUFSIZ];
-	gchar *p, *tab;
+	tagEntry entry;
+	tagFile *f = tagsOpen(tags_file, NULL);
+	const gchar *lang_kinds = tm_ctags_get_lang_kinds(lang);
+	GPtrArray *unknown_fields = g_ptr_array_new_full(10, NULL);

any reason not to use GArray instead? OK it's a tad awkward as well, but less so than GPtrArray for storing integers I'd say. I don't have to draw you a picture, but:

GArray *array = g_array_sized_new(FALSE, FALSE, sizeof(guint), 10);
g_array_append_val(array, i);
guint i2 = g_array_index(array, guint, idx);


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <geany/geany/pull/3049/review/1669177204@github.com>