Branch: refs/heads/master Author: Jiří Techet techet@gmail.com Committer: Jiří Techet techet@gmail.com Date: Mon, 10 Jan 2022 20:43:52 UTC Commit: 9cfd7ebbf9b6f61abc874f105b926831cd55d3a2 https://github.com/geany/geany/commit/9cfd7ebbf9b6f61abc874f105b926831cd55d3...
Log Message: ----------- Rename pointerOrder TMtag member to flags
We now use varType instead of pointerOrder and it has been the case for quite and we can use the pointerOrder field for storing something useful. When we store something else inside the renamed pointerOrder, we will break compatibility with some very old tag files but I don't think there are any such files around (also pointerOrder was probably just reported by the C parser).
Bump API for the pointerOrder change to flags
Modified Paths: -------------- src/plugindata.h src/tagmanager/tm_ctags.c src/tagmanager/tm_source_file.c src/tagmanager/tm_tag.c src/tagmanager/tm_tag.h
Modified: src/plugindata.h 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -58,7 +58,7 @@ G_BEGIN_DECLS * @warning You should not test for values below 200 as previously * @c GEANY_API_VERSION was defined as an enum value, not a macro. */ -#define GEANY_API_VERSION 242 +#define GEANY_API_VERSION 243
/* hack to have a different ABI when built with different GTK major versions * because loading plugins linked to a different one leads to crashes.
Modified: src/tagmanager/tm_ctags.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -120,7 +120,7 @@ static gboolean init_tag(TMTag *tag, TMSourceFile *file, const tagEntryInfo *tag tag->name = g_strdup(tag_entry->name); tag->type = type; tag->local = tag_entry->isFileScope; - tag->pointerOrder = 0; /* backward compatibility (use var_type instead) */ + tag->flags = 0; tag->line = tag_entry->lineNumber; if (NULL != tag_entry->extensionFields.signature) tag->arglist = g_strdup(tag_entry->extensionFields.signature);
Modified: src/tagmanager/tm_source_file.c 12 lines changed, 6 insertions(+), 6 deletions(-) =================================================================== @@ -65,7 +65,7 @@ enum TA_IMPL, TA_LANG, TA_INACTIVE, /* Obsolete */ - TA_POINTER + TA_FLAGS };
@@ -219,8 +219,8 @@ static gboolean init_tag_from_file(TMTag *tag, TMSourceFile *file, FILE *fp) case TA_SCOPE: tag->scope = g_strdup((gchar*)start + 1); break; - case TA_POINTER: - tag->pointerOrder = atoi((gchar*)start + 1); + case TA_FLAGS: + tag->flags = atoi((gchar*)start + 1); break; case TA_VARTYPE: tag->var_type = g_strdup((gchar*)start + 1); @@ -463,8 +463,8 @@ static gboolean write_tag(TMTag *tag, FILE *fp, TMTagAttrType attrs) fprintf(fp, "%c%s", TA_SCOPE, tag->scope); if ((attrs & tm_tag_attr_inheritance_t) && (NULL != tag->inheritance)) fprintf(fp, "%c%s", TA_INHERITS, tag->inheritance); - if (attrs & tm_tag_attr_pointer_t) - fprintf(fp, "%c%d", TA_POINTER, tag->pointerOrder); + if (attrs & tm_tag_attr_flags_t) + fprintf(fp, "%c%d", TA_FLAGS, tag->flags); if ((attrs & tm_tag_attr_vartype_t) && (NULL != tag->var_type)) fprintf(fp, "%c%s", TA_VARTYPE, tag->var_type); if ((attrs & tm_tag_attr_access_t) && (TAG_ACCESS_UNKNOWN != tag->access)) @@ -551,7 +551,7 @@ gboolean tm_source_file_write_tags_file(const gchar *tags_file, GPtrArray *tags_
ret = write_tag(tag, fp, tm_tag_attr_type_t | tm_tag_attr_scope_t | tm_tag_attr_arglist_t | tm_tag_attr_vartype_t - | tm_tag_attr_pointer_t); + | tm_tag_attr_flags_t);
if (!ret) break;
Modified: src/tagmanager/tm_tag.c 2 lines changed, 1 insertions(+), 1 deletions(-) =================================================================== @@ -228,7 +228,7 @@ gboolean tm_tags_equal(const TMTag *a, const TMTag *b) strcmp(FALLBACK(a->name, ""), FALLBACK(b->name, "")) == 0 && a->type == b->type && a->local == b->local && - a->pointerOrder == b->pointerOrder && + a->flags == b->flags && a->access == b->access && a->impl == b->impl && a->lang == b->lang &&
Modified: src/tagmanager/tm_tag.h 4 lines changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -65,7 +65,7 @@ typedef enum tm_tag_attr_impl_t = 4096, /**< Implementation (e.g. virtual) */ tm_tag_attr_lang_t = 8192, /**< Language (File tag only) */ tm_tag_attr_inactive_t = 16384, /**< Inactive file (File tag only, obsolete) */ - tm_tag_attr_pointer_t = 32768, /**< Pointer type */ + tm_tag_attr_flags_t = 32768, /**< Additional flags */ tm_tag_attr_max_t = 65535 /**< Maximum value */ } TMTagAttrType;
@@ -94,7 +94,7 @@ typedef struct TMTag TMSourceFile *file; /**< File in which the tag occurs; NULL for global tags */ gulong line; /**< Line number of the tag */ gboolean local; /**< Is the tag of local scope */ - guint pointerOrder; + guint flags; /**< Additional flags */ char *arglist; /**< Argument list (functions/prototypes/macros) */ char *scope; /**< Scope of tag */ char *inheritance; /**< Parent classes */
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).