[geany/geany] 292383: Some more uses of TMParserType instead of int
Jiří Techet
git-noreply at xxxxx
Fri Feb 26 00:11:53 UTC 2016
Branch: refs/heads/master
Author: Jiří Techet <techet at gmail.com>
Committer: Jiří Techet <techet at gmail.com>
Date: Fri, 26 Feb 2016 00:11:53 UTC
Commit: 292383c197b72c56f44b68b14845093adfed7133
https://github.com/geany/geany/commit/292383c197b72c56f44b68b14845093adfed7133
Log Message:
-----------
Some more uses of TMParserType instead of int
Modified Paths:
--------------
src/filetypes.c
src/symbols.c
src/symbols.h
tagmanager/src/tm_workspace.c
tagmanager/src/tm_workspace.h
Modified: src/filetypes.c
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -103,7 +103,7 @@ static gchar *filetype_make_title(const char *name, enum TitleType type)
/* name argument (ie filetype name) must not be translated as it is used for
* filetype lookup. Use filetypes_get_display_name() instead.*/
-static void ft_init(filetype_id ft_id, int lang, const char *name,
+static void ft_init(filetype_id ft_id, TMParserType lang, const char *name,
const char *title_name, enum TitleType title_type,
GeanyFiletypeGroupID group_id)
{
@@ -950,7 +950,7 @@ static void load_settings(guint ft_id, GKeyFile *config, GKeyFile *configh)
if (result != NULL)
{
ft->lang = tm_source_file_get_named_lang(result);
- if (ft->lang < 0)
+ if (ft->lang == TM_PARSER_NONE)
geany_debug("Cannot find tags parser '%s' for custom filetype '%s'.", result, ft->name);
g_free(result);
}
@@ -1240,7 +1240,7 @@ gboolean filetype_has_tags(GeanyFiletype *ft)
{
g_return_val_if_fail(ft != NULL, FALSE);
- return ft->lang >= 0;
+ return ft->lang != TM_PARSER_NONE;
}
Modified: src/symbols.c
4 lines changed, 2 insertions(+), 2 deletions(-)
===================================================================
@@ -272,13 +272,13 @@ static void html_tags_loaded(void)
}
-GString *symbols_find_typenames_as_string(gint lang, gboolean global)
+GString *symbols_find_typenames_as_string(TMParserType lang, gboolean global)
{
guint j;
TMTag *tag;
GString *s = NULL;
GPtrArray *typedefs;
- gint tag_lang;
+ TMParserType tag_lang;
if (global)
typedefs = app->tm_workspace->global_typename_array;
Modified: src/symbols.h
4 lines changed, 1 insertions(+), 3 deletions(-)
===================================================================
@@ -50,9 +50,7 @@ void symbols_reload_config_files(void);
void symbols_global_tags_loaded(guint file_type_idx);
-GString *symbols_find_typenames_as_string(gint lang, gboolean global);
-
-const GList *symbols_get_tag_list(GeanyDocument *doc, guint tag_types);
+GString *symbols_find_typenames_as_string(TMParserType lang, gboolean global);
const gchar **symbols_get_html_entities(void);
Modified: tagmanager/src/tm_workspace.c
6 lines changed, 3 insertions(+), 3 deletions(-)
===================================================================
@@ -337,7 +337,7 @@ void tm_workspace_remove_source_files(GPtrArray *source_files)
@return TRUE on success, FALSE on failure.
@see tm_workspace_create_global_tags()
*/
-gboolean tm_workspace_load_global_tags(const char *tags_file, gint mode)
+gboolean tm_workspace_load_global_tags(const char *tags_file, TMParserType mode)
{
guchar buf[BUFSIZ];
FILE *fp;
@@ -1042,7 +1042,7 @@ static GPtrArray *find_namespace_members_all(const GPtrArray *tags, const GPtrAr
/* Returns all member tags of a struct/union/class if the provided name is a variable
of such a type or the name of the type.
- @param source_file TMSourceFile of the edited source file or NULL if not available
+ @param source_file TMSourceFile of the edited source file
@param name Name of the variable/type whose members are searched
@param function TRUE if the name is a name of a function
@param member TRUE if invoked on class/struct member (e.g. after the last dot in foo.bar.)
@@ -1053,7 +1053,7 @@ GPtrArray *
tm_workspace_find_scope_members (TMSourceFile *source_file, const char *name,
gboolean function, gboolean member, const gchar *current_scope, gboolean search_namespace)
{
- TMParserType lang = source_file ? source_file->lang : -1;
+ TMParserType lang = source_file->lang;
GPtrArray *tags, *member_tags = NULL;
TMTagType function_types = tm_tag_function_t | tm_tag_method_t |
tm_tag_macro_with_arg_t | tm_tag_prototype_t;
Modified: tagmanager/src/tm_workspace.h
2 lines changed, 1 insertions(+), 1 deletions(-)
===================================================================
@@ -50,7 +50,7 @@ void tm_workspace_remove_source_files(GPtrArray *source_files);
const TMWorkspace *tm_get_workspace(void);
-gboolean tm_workspace_load_global_tags(const char *tags_file, gint mode);
+gboolean tm_workspace_load_global_tags(const char *tags_file, TMParserType mode);
gboolean tm_workspace_create_global_tags(const char *pre_process, const char **includes,
int includes_count, const char *tags_file, TMParserType lang);
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list