Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Wed, 05 Nov 2014 20:50:07 UTC Commit: a95fc1a994a90e4bf3d1a27a4dc4accdc14fa91c https://github.com/geany/geany/commit/a95fc1a994a90e4bf3d1a27a4dc4accdc14fa9...
Log Message: ----------- Don't expose the source file update function to plugins
Modified Paths: -------------- plugins/geanyfunctions.h src/document.c src/plugindata.h src/plugins.c tagmanager/src/tm_workspace.c tagmanager/src/tm_workspace.h
Modified: plugins/geanyfunctions.h 2 lines changed, 0 insertions(+), 2 deletions(-) =================================================================== @@ -350,8 +350,6 @@ geany_functions->p_tm->tm_source_file_free #define tm_workspace_add_source_file \ geany_functions->p_tm->tm_workspace_add_source_file -#define tm_workspace_update_source_file \ - geany_functions->p_tm->tm_workspace_update_source_file #define tm_workspace_remove_source_file \ geany_functions->p_tm->tm_workspace_remove_source_file #define tm_workspace_add_source_files \
Modified: src/document.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -2488,7 +2488,7 @@ void document_update_tags(GeanyDocument *doc) g_free(locale_filename);
if (doc->tm_file) - tm_workspace_add_source_file(doc->tm_file); + tm_workspace_add_source_file_noupdate(doc->tm_file); }
/* early out if there's no tm source file and we couldn't create one */
Modified: src/plugindata.h 1 lines changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -602,7 +602,6 @@ typedef struct TagManagerFuncs TMSourceFile* (*tm_source_file_new) (const char *file_name, const char *name); void (*tm_source_file_free) (TMSourceFile *source_file); void (*tm_workspace_add_source_file) (TMSourceFile *source_file); - void (*tm_workspace_update_source_file) (TMSourceFile *source_file); void (*tm_workspace_remove_source_file) (TMSourceFile *source_file); void (*tm_workspace_add_source_files) (GPtrArray *source_files); void (*tm_workspace_remove_source_files) (GPtrArray *source_files);
Modified: src/plugins.c 1 lines changed, 0 insertions(+), 1 deletions(-) =================================================================== @@ -292,7 +292,6 @@ static TagManagerFuncs tagmanager_funcs = { &tm_source_file_new, &tm_source_file_free, &tm_workspace_add_source_file, - &tm_workspace_update_source_file, &tm_workspace_remove_source_file, &tm_workspace_add_source_files, &tm_workspace_remove_source_files
Modified: tagmanager/src/tm_workspace.c 16 lines changed, 7 insertions(+), 9 deletions(-) =================================================================== @@ -154,9 +154,7 @@ static void update_source_file(TMSourceFile *source_file, guchar* text_buf, }
-/** Adds a source file to the workspace. At some point, tm_workspace_update_source_file() - has to be called to parse the source file, create the source file's tag array - and update the workspace tag arrays. +/** Adds a source file to the workspace, parses it and updates the workspace tags. @param source_file The source file to add to the workspace. */ void tm_workspace_add_source_file(TMSourceFile *source_file) @@ -164,15 +162,15 @@ void tm_workspace_add_source_file(TMSourceFile *source_file) g_return_if_fail(source_file != NULL);
g_ptr_array_add(theWorkspace->source_files, source_file); + update_source_file(source_file, NULL, 0, FALSE, TRUE); }
-/** Parses the source file, updates its tag array and the workspace tag arrays. - @param source_file The source file to update. -*/ -void tm_workspace_update_source_file(TMSourceFile *source_file) +void tm_workspace_add_source_file_noupdate(TMSourceFile *source_file) { - update_source_file(source_file, NULL, 0, FALSE, TRUE); + g_return_if_fail(source_file != NULL); + + g_ptr_array_add(theWorkspace->source_files, source_file); }
@@ -277,7 +275,7 @@ void tm_workspace_add_source_files(GPtrArray *source_files) { TMSourceFile *source_file = source_files->pdata[i]; - tm_workspace_add_source_file(source_file); + tm_workspace_add_source_file_noupdate(source_file); update_source_file(source_file, NULL, 0, FALSE, FALSE); }
Modified: tagmanager/src/tm_workspace.h 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -38,8 +38,6 @@ typedef struct
void tm_workspace_add_source_file(TMSourceFile *source_file);
-void tm_workspace_update_source_file(TMSourceFile *source_file); - void tm_workspace_remove_source_file(TMSourceFile *source_file);
void tm_workspace_add_source_files(GPtrArray *source_files); @@ -68,6 +66,8 @@ const GPtrArray *tm_workspace_find_scope_members(const GPtrArray *file_tags, gboolean find_global, gboolean no_definitions);
+void tm_workspace_add_source_file_noupdate(TMSourceFile *source_file); + void tm_workspace_update_source_file_buffer(TMSourceFile *source_file, guchar* text_buf, gint buf_size);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).