Permalink
Browse files

python: Don't duplicate the kind names

  • Loading branch information...
b4n committed Jan 9, 2014
1 parent 8d5c7fb commit 5412f73d02f0d40b96d3e2a666e09faaa44ddbf9
Showing with 5 additions and 5 deletions.
  1. +5 −5 tagmanager/ctags/python.c
View
@@ -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);

0 comments on commit 5412f73

Please sign in to comment.