Revision: 1262 http://geany-plugins.svn.sourceforge.net/geany-plugins/?rev=1262&view=re... Author: colombanw Date: 2010-04-20 20:56:12 +0000 (Tue, 20 Apr 2010)
Log Message: ----------- GeanyGenDoc: Make tag find functions take a const array
Tag find functions actually doesn't and shouldn't have to modify the the given tag list they work on.
Modified Paths: -------------- trunk/geanygendoc/src/ggd-tag-utils.c trunk/geanygendoc/src/ggd-tag-utils.h
Modified: trunk/geanygendoc/src/ggd-tag-utils.c =================================================================== --- trunk/geanygendoc/src/ggd-tag-utils.c 2010-04-20 20:55:44 UTC (rev 1261) +++ trunk/geanygendoc/src/ggd-tag-utils.c 2010-04-20 20:56:12 UTC (rev 1262) @@ -79,8 +79,8 @@ }
TMTag * -ggd_tag_find_from_line (GPtrArray *tags, - gulong line) +ggd_tag_find_from_line (const GPtrArray *tags, + gulong line) { TMTag *tag = NULL; TMTag *el; @@ -114,8 +114,8 @@ }
TMTag * -ggd_tag_find_parent (GPtrArray *tags, - const TMTag *child) +ggd_tag_find_parent (const GPtrArray *tags, + const TMTag *child) { TMTag *tag = NULL;
@@ -238,8 +238,8 @@ * Returns: the tag's type hierarchy or %NULL if invalid. */ gchar * -ggd_tag_resolve_type_hierarchy (GPtrArray *tags, - const TMTag *tag) +ggd_tag_resolve_type_hierarchy (const GPtrArray *tags, + const TMTag *tag) { gchar *scope = NULL;
@@ -283,8 +283,8 @@ * Returns: The #TMTag named @name, or %NULL if none matches */ TMTag * -ggd_tag_find_from_name (GPtrArray *tags, - const gchar *name) +ggd_tag_find_from_name (const GPtrArray *tags, + const gchar *name) { TMTag *tag = NULL; guint i; @@ -365,9 +365,9 @@ * Returns: The list of found children */ GList * -ggd_tag_find_children (GPtrArray *tags, - const TMTag *parent, - gint depth) +ggd_tag_find_children (const GPtrArray *tags, + const TMTag *parent, + gint depth) { GList *children = NULL; guint i;
Modified: trunk/geanygendoc/src/ggd-tag-utils.h =================================================================== --- trunk/geanygendoc/src/ggd-tag-utils.h 2010-04-20 20:55:44 UTC (rev 1261) +++ trunk/geanygendoc/src/ggd-tag-utils.h 2010-04-20 20:56:12 UTC (rev 1262) @@ -27,18 +27,18 @@
void ggd_tag_sort_by_line (GPtrArray *tags); -TMTag *ggd_tag_find_from_line (GPtrArray *tags, - gulong line); +TMTag *ggd_tag_find_from_line (const GPtrArray *tags, + gulong line); TMTag *ggd_tag_find_at_current_pos (GeanyDocument *doc); -TMTag *ggd_tag_find_parent (GPtrArray *tags, - const TMTag *child); -GList *ggd_tag_find_children (GPtrArray *tags, - const TMTag *parent, - gint depth); -gchar *ggd_tag_resolve_type_hierarchy (GPtrArray *tags, - const TMTag *tag); -TMTag *ggd_tag_find_from_name (GPtrArray *tags, - const gchar *name); +TMTag *ggd_tag_find_parent (const GPtrArray *tags, + const TMTag *child); +GList *ggd_tag_find_children (const GPtrArray *tags, + const TMTag *parent, + gint depth); +gchar *ggd_tag_resolve_type_hierarchy (const GPtrArray *tags, + const TMTag *tag); +TMTag *ggd_tag_find_from_name (const GPtrArray *tags, + const gchar *name); const gchar *ggd_tag_get_type_name (const TMTag *tag); const gchar *ggd_tag_type_get_name (TMTagType type); TMTagType ggd_tag_type_from_name (const gchar *name);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.