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:
Maxime Chretien 2020-06-11 10:02:04 +02:00
parent c555bf4338
commit a05f4972bc

View file

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