Kaydet (Commit) 169feae9 authored tarafından Thomas Martitz's avatar Thomas Martitz Kaydeden (comit) Matthew Brush

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
üst bc7e64f7
......@@ -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
......
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment