From a05f4972bc3770302c4a460ac166949f65dcfe19 Mon Sep 17 00:00:00 2001 From: Maxime Chretien Date: Thu, 11 Jun 2020 10:02:04 +0200 Subject: [PATCH] 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 --- update.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/update.py b/update.py index 3c29bb5..9188809 100755 --- a/update.py +++ b/update.py @@ -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: