[geany/geany] 5412f7: python: Don't duplicate the kind names

Colomban Wendling git-noreply at xxxxx
Thu Jan 9 01:12:44 UTC 2014


Branch:      refs/heads/master
Author:      Colomban Wendling <ban at herbesfolles.org>
Committer:   Colomban Wendling <ban at herbesfolles.org>
Date:        Thu, 09 Jan 2014 01:12:44 UTC
Commit:      5412f73d02f0d40b96d3e2a666e09faaa44ddbf9
             https://github.com/geany/geany/commit/5412f73d02f0d40b96d3e2a666e09faaa44ddbf9

Log Message:
-----------
python: Don't duplicate the kind names


Modified Paths:
--------------
    tagmanager/ctags/python.c

Modified: tagmanager/ctags/python.c
10 files changed, 5 insertions(+), 5 deletions(-)
===================================================================
@@ -105,12 +105,12 @@ static void makeFunctionTag (vString *const function,
 		{
 			tag.kindName = PythonKinds[K_METHOD].name;
 			tag.kind = PythonKinds[K_METHOD].letter;
-			tag.extensionFields.scope [0] = "class";
+			tag.extensionFields.scope [0] = PythonKinds[K_CLASS].name;
 			tag.extensionFields.scope [1] = vStringValue (parent);
 		}
 		else
 		{
-			tag.extensionFields.scope [0] = "function";
+			tag.extensionFields.scope [0] = PythonKinds[K_FUNCTION].name;
 			tag.extensionFields.scope [1] = vStringValue (parent);
 		}
 	}
@@ -146,12 +146,12 @@ static void makeClassTag (vString *const class, vString *const inheritance,
 	{
 		if (is_class_parent)
 		{
-			tag.extensionFields.scope [0] = "class";
+			tag.extensionFields.scope [0] = PythonKinds[K_CLASS].name;
 			tag.extensionFields.scope [1] = vStringValue (parent);
 		}
 		else
 		{
-			tag.extensionFields.scope [0] = "function";
+			tag.extensionFields.scope [0] = PythonKinds[K_FUNCTION].name;
 			tag.extensionFields.scope [1] = vStringValue (parent);
 		}
 	}
@@ -167,7 +167,7 @@ static void makeVariableTag (vString *const var, vString *const parent)
 	tag.kind = PythonKinds[K_VARIABLE].letter;
 	if (vStringLength (parent) > 0)
 	{
-		tag.extensionFields.scope [0] = "class";
+		tag.extensionFields.scope [0] = PythonKinds[K_CLASS].name;
 		tag.extensionFields.scope [1] = vStringValue (parent);
 	}
 	makeTagEntry (&tag);



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