update.py: Use lib.isIdent while parsing definitions
If an ident is in db.defs it's already a valid ident. So we need to test the idents with lib.isIdent before adding an ident in db.defs and not while parsing references. Signed-off-by: Maxime Chretien <maxime.chretien@bootlin.com>
This commit is contained in:
parent
c555bf4338
commit
a05f4972bc
1 changed files with 4 additions and 2 deletions
|
|
@ -230,8 +230,10 @@ class UpdateDefs(Thread):
|
|||
|
||||
if db.defs.exists(ident):
|
||||
obj = db.defs.get(ident)
|
||||
else:
|
||||
elif lib.isIdent(ident):
|
||||
obj = data.DefList()
|
||||
else:
|
||||
continue
|
||||
|
||||
obj.append(idx, type, line, family)
|
||||
if verbose:
|
||||
|
|
@ -293,7 +295,7 @@ class UpdateRefs(Thread):
|
|||
if even:
|
||||
tok = prefix + tok
|
||||
|
||||
if db.defs.exists(tok) and lib.isIdent(tok):
|
||||
if db.defs.exists(tok):
|
||||
if tok in idents:
|
||||
idents[tok] += ',' + str(line_num)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Reference in a new issue