summaryrefslogtreecommitdiffstats
path: root/src/pycode.l
diff options
context:
space:
mode:
authorDimitri van Heesch <doxygen@gmail.com>2020-10-19 18:44:40 (GMT)
committerDimitri van Heesch <doxygen@gmail.com>2020-10-20 11:51:24 (GMT)
commitd03e8d9411ab3e983fc3413c147fba1a5e5c9dad (patch)
treed834ff826fdf72e526b3bac2772006583535766c /src/pycode.l
parent33b0f4d25dff25b0e50d62eff68155106e88d58d (diff)
downloadDoxygen-d03e8d9411ab3e983fc3413c147fba1a5e5c9dad.zip
Doxygen-d03e8d9411ab3e983fc3413c147fba1a5e5c9dad.tar.gz
Doxygen-d03e8d9411ab3e983fc3413c147fba1a5e5c9dad.tar.bz2
Refactoring: modernize TooltipManager class and source reference lists
- Tooltips are now collected per file instead of globally - Source reference lists now use STL containers
Diffstat (limited to 'src/pycode.l')
-rw-r--r--src/pycode.l9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/pycode.l b/src/pycode.l
index cc00447..bcba42f 100644
--- a/src/pycode.l
+++ b/src/pycode.l
@@ -106,6 +106,7 @@ struct pycodeYY_state
bool endComment = FALSE;
VariableContext theVarContext;
CallContext theCallContext;
+ TooltipManager tooltipManager;
};
@@ -147,7 +148,6 @@ static void addVariable(yyscan_t yyscanner, QCString type, QCString name);
//-------------------------------------------------------------------
static std::mutex g_searchIndexMutex;
-static std::mutex g_tooltipMutex;
//-------------------------------------------------------------------
@@ -1087,10 +1087,7 @@ static void writeMultiLineCodeLink(yyscan_t yyscanner,
{
struct yyguts_t *yyg = (struct yyguts_t*)yyscanner;
bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS);
- {
- std::lock_guard<std::mutex> lock(g_tooltipMutex);
- TooltipManager::instance()->addTooltip(d);
- }
+ yyextra->tooltipManager.addTooltip(d);
QCString ref = d->getReference();
QCString file = d->getOutputFileBase();
QCString anchor = d->anchor();
@@ -1629,6 +1626,8 @@ void PythonCodeParser::parseCode(CodeOutputInterface &codeOutIntf,
delete yyextra->sourceFileDef;
yyextra->sourceFileDef=0;
}
+ // write the tooltips
+ yyextra->tooltipManager.writeTooltips(codeOutIntf);
printlex(yy_flex_debug, FALSE, __FILE__, fileDef ? fileDef->fileName().data(): NULL);
}