def ensureHtmlifier(blob, srcpath, treecfg, conn=None, dbpath=None): global htmlifier_current_path global htmlifier_current if srcpath != htmlifier_current_path: htmlifier_current_path = srcpath if dbpath is None: dbpath = srcpath htmlifier_current = CxxHtmlifier(blob, dbpath, treecfg, conn) htmlifier_current.tokenizer = CppTokenizer(dxr.readFile(srcpath)) return htmlifier_current