[geany/geany] 169fea: api: export tm_tag_get_type()

Thomas Martitz git-noreply at xxxxx
Fri Aug 4 07:17:11 UTC 2017


Branch:      refs/heads/master
Author:      Thomas Martitz <kugel at rockbox.org>
Committer:   Matthew Brush <mbrush at codebrainz.ca>
Date:        Fri, 04 Aug 2017 07:17:11 UTC
Commit:      169feae90e72d54049c7765c6975fa9a009268aa
             https://github.com/geany/geany/commit/169feae90e72d54049c7765c6975fa9a009268aa

Log Message:
-----------
api: export tm_tag_get_type()

This indicates that TMTag is GBoxed-derived, and can be copied/ref'd.

This helps plugins that must store a tag pointer for later usage while the
tagmanager might let it go in the meantime (can happen quickly if the user
comments a function out when starting a doxygen-comment).

Closes #1465


Modified Paths:
--------------
    doc/Doxyfile.in
    src/tagmanager/tm_tag.c
    src/tagmanager/tm_tag.h

Modified: doc/Doxyfile.in
1 lines changed, 1 insertions(+), 0 deletions(-)
===================================================================
@@ -798,6 +798,7 @@ INPUT                  = @top_srcdir@/src/ \
                          @top_srcdir@/src/tagmanager/tm_source_file.h \
                          @top_srcdir@/src/tagmanager/tm_workspace.c \
                          @top_srcdir@/src/tagmanager/tm_workspace.h \
+                         @top_srcdir@/src/tagmanager/tm_tag.c \
                          @top_srcdir@/src/tagmanager/tm_tag.h \
                          @top_srcdir@/src/tagmanager/tm_parser.h
 


Modified: src/tagmanager/tm_tag.c
6 lines changed, 5 insertions(+), 1 deletions(-)
===================================================================
@@ -82,7 +82,11 @@ typedef struct
 	gboolean first;
 } TMSortOptions;
 
-/* Gets the GType for a TMTag */
+/** Gets the GType for a TMTag.
+ *
+ * @return TMTag type
+ * @since 1.32 (API 232) */
+GEANY_API_SYMBOL
 GType tm_tag_get_type(void)
 {
 	static GType gtype = 0;


Modified: src/tagmanager/tm_tag.h
5 lines changed, 2 insertions(+), 3 deletions(-)
===================================================================
@@ -103,14 +103,13 @@ typedef struct TMTag
 	TMParserType lang; /* Programming language of the file */
 } TMTag;
 
-
-#ifdef GEANY_PRIVATE
-
 /* The GType for a TMTag */
 #define TM_TYPE_TAG (tm_tag_get_type())
 
 GType tm_tag_get_type(void) G_GNUC_CONST;
 
+#ifdef GEANY_PRIVATE
+
 TMTag *tm_tag_new(void);
 
 void tm_tags_remove_file_tags(TMSourceFile *source_file, GPtrArray *tags_array);



--------------
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