Applied a patch (with minor modification) by Jan Larres to not include tab characters in the signature of Python functions.

git-svn-id: svn://svn.code.sf.net/p/ctags/code/trunk@789 c5d04d22-be80-434c-894e-aa346cc9e8e8
This commit is contained in:
elias 2012-09-17 22:19:32 +00:00
parent 98a8c332ef
commit 747395e852
2 changed files with 20 additions and 2 deletions

3
Test/tabindent.py Normal file
View File

@ -0,0 +1,3 @@
def find_heading(self, position=0, direction=Direction.FORWARD, \
heading=Heading, connect_with_document=True):
pass

View File

@ -135,7 +135,7 @@ static boolean isIdentifierCharacter (int c)
* extract all relevant information and create a tag.
*/
static void makeFunctionTag (vString *const function,
vString *const parent, int is_class_parent, const char *arglist __unused__)
vString *const parent, int is_class_parent, const char *arglist)
{
tagEntryInfo tag;
initTagEntry (&tag, vStringValue (function));
@ -394,6 +394,8 @@ static char *parseArglist(const char *buf)
{
char *start, *end;
int level;
char *arglist, *from, *to;
int len;
if (NULL == buf)
return NULL;
if (NULL == (start = strchr(buf, '(')))
@ -408,7 +410,20 @@ static char *parseArglist(const char *buf)
-- level;
}
*end = '\0';
return strdup(start);
len = strlen(start) + 1;
arglist = eMalloc(len);
from = start;
to = arglist;
while (*from != '\0') {
if (*from == '\t')
; /* tabs are illegal in field values */
else
*to++ = *from;
++from;
}
*to = '\0';
return arglist;
}
static void parseFunction (const char *cp, vString *const def,