Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Sat, 08 Nov 2014 17:13:13 UTC Commit: b38f1f99d54d0f8a95d1485f38bc8bb10467a17c https://github.com/geany/geany/commit/b38f1f99d54d0f8a95d1485f38bc8bb10467a1...
Log Message: ----------- TM: Use gsize everywhere for the memory buffer size
Modified Paths: -------------- tagmanager/ctags/read.c tagmanager/ctags/read.h tagmanager/src/tm_source_file.c tagmanager/src/tm_source_file.h tagmanager/src/tm_workspace.c tagmanager/src/tm_workspace.h
Modified: tagmanager/ctags/read.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -298,7 +298,7 @@ extern boolean fileOpen (const char *const fileName, const langType language) * This func is NOT THREAD SAFE. * The user should not tamper with the buffer while this func is executing. */ -extern boolean bufferOpen (unsigned char *buffer, int buffer_size, +extern boolean bufferOpen (unsigned char *buffer, size_t buffer_size, const char *const fileName, const langType language ) { boolean opened = FALSE;
Modified: tagmanager/ctags/read.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -106,7 +106,7 @@ extern void fileUngetc (int c); extern const unsigned char *fileReadLine (void); extern char *readLine (vString *const vLine, MIO *const mio); extern char *readSourceLine (vString *const vLine, MIOPos location, long *const pSeekValue); -extern boolean bufferOpen (unsigned char *buffer, int buffer_size, +extern boolean bufferOpen (unsigned char *buffer, size_t buffer_size, const char *const fileName, const langType language ); #define bufferClose fileClose
Modified: tagmanager/src/tm_source_file.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -242,7 +242,7 @@ void tm_source_file_free(TMSourceFile *source_file) TRUE to parse the buffer and ignore the file content. @return TRUE on success, FALSE on failure */ -gboolean tm_source_file_parse(TMSourceFile *source_file, guchar* text_buf, gint buf_size, +gboolean tm_source_file_parse(TMSourceFile *source_file, guchar* text_buf, gsize buf_size, gboolean use_buffer) { const char *file_name;
Modified: tagmanager/src/tm_source_file.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -57,7 +57,7 @@ const gchar *tm_source_file_get_lang_name(gint lang);
gint tm_source_file_get_named_lang(const gchar *name);
-gboolean tm_source_file_parse(TMSourceFile *source_file, guchar* text_buf, gint buf_size, +gboolean tm_source_file_parse(TMSourceFile *source_file, guchar* text_buf, gsize buf_size, gboolean use_buffer);
#endif /* GEANY_PRIVATE */
Modified: tagmanager/src/tm_workspace.c 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -117,7 +117,7 @@ static void tm_workspace_merge_tags(GPtrArray **big_array, GPtrArray *small_arra
static void update_source_file(TMSourceFile *source_file, guchar* text_buf, - gint buf_size, gboolean use_buffer, gboolean update_workspace) + gsize buf_size, gboolean use_buffer, gboolean update_workspace) { #ifdef TM_DEBUG g_message("Source file updating based on source file %s", source_file->file_name); @@ -188,7 +188,7 @@ void tm_workspace_add_source_file_noupdate(TMSourceFile *source_file) @param buf_size The size of text_buf. */ void tm_workspace_update_source_file_buffer(TMSourceFile *source_file, guchar* text_buf, - gint buf_size) + gsize buf_size) { update_source_file(source_file, text_buf, buf_size, TRUE, TRUE); }
Modified: tagmanager/src/tm_workspace.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -69,7 +69,7 @@ const GPtrArray *tm_workspace_find_scope_members(const GPtrArray *file_tags, 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); + gsize buf_size);
void tm_workspace_free(void);
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).