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:
parent
98a8c332ef
commit
747395e852
|
@ -0,0 +1,3 @@
|
|||
def find_heading(self, position=0, direction=Direction.FORWARD, \
|
||||
heading=Heading, connect_with_document=True):
|
||||
pass
|
19
python.c
19
python.c
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue