In tagmanager/src/tm_workspace.c:

> -/* Returns all matching members tags found in given struct/union/class name.
> - @param name Name of the struct/union/class.
> - @param file_tags A GPtrArray of edited file TMTag pointers (for search speedup, can be NULL).
> - @return A GPtrArray of TMTag pointers to struct/union/class members */
> -const GPtrArray *
> -tm_workspace_find_scope_members (const GPtrArray * file_tags, const char *name,
> -								 gboolean search_global, gboolean no_definitions)
> +/* Returns tags with the specified prefix sorted by name. If there are several
> + tags with the same name, only one of them appears in the resulting array.
> + @param prefix The prefix of the tag to find.
> + @param lang Specifies the language(see the table in parsers.h) of the tags to be found,
> +             -1 for all.
> + @param max_num The maximum number of tags to return.
> + @return Array of matching tags sorted by their name.
> +*/
> +GPtrArray *tm_workspace_find_prefix(const char *prefix, langType lang, gint max_num)

max_num should be unsigned: it gets fed an unsigned in the only call site (editor_prefs.autocompletion_max_entries), and it compares it against an unsigned too (tags->len).


Reply to this email directly or view it on GitHub.