diff options
Diffstat (limited to 'src/pycode.l')
-rw-r--r-- | src/pycode.l | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/src/pycode.l b/src/pycode.l index 4fb27f1..b0ec68e 100644 --- a/src/pycode.l +++ b/src/pycode.l @@ -63,7 +63,7 @@ static const char * g_inputString; //!< the code fragment as text static int g_inputPosition; //!< read offset during parsing static const char * g_currentFontClass; static bool g_needsTermination; -static Definition *g_searchCtx; +static const Definition *g_searchCtx; static bool g_collectXRefs; static int g_inputLines; //!< number of line in the code fragment static int g_yyLineNr; //!< current line number @@ -437,7 +437,7 @@ static void nextCodeLine() * split into multiple links with the same destination, one for each line. */ static void writeMultiLineCodeLink(CodeOutputInterface &ol, - Definition *d, + const Definition *d, const char *text) { static bool sourceTooltips = Config_getBool(SOURCE_TOOLTIPS); @@ -544,11 +544,11 @@ static bool getLinkInScope(const QCString &c, // scope const char *text ) { - MemberDef *md; - ClassDef *cd; - FileDef *fd; - NamespaceDef *nd; - GroupDef *gd; + MemberDef *md = 0; + const ClassDef *cd = 0; + const FileDef *fd = 0; + const NamespaceDef *nd = 0; + const GroupDef *gd = 0; //printf("Trying `%s'::`%s'\n",c.data(),m.data()); if (getDefs(c,m,"()",md,cd,fd,nd,gd,FALSE,g_sourceFileDef) && md->isLinkable()) @@ -556,8 +556,8 @@ static bool getLinkInScope(const QCString &c, // scope //Definition *d=0; //if (cd) d=cd; else if (nd) d=nd; else if (fd) d=fd; else d=gd; - Definition *d = md->getOuterScope()==Doxygen::globalScope ? - md->getBodyDef() : md->getOuterScope(); + const Definition *d = md->getOuterScope()==Doxygen::globalScope ? + md->getBodyDef() : md->getOuterScope(); //printf("Found! d=%s\n",d?d->name().data():"<none>"); if (md->getGroupDef()) d = md->getGroupDef(); if (d && d->isLinkable()) @@ -634,7 +634,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName, if (cd==0 && md==0) // also see if it is variable or enum or enum value { - NamespaceDef *nd = getResolvedNamespace(scope); + const NamespaceDef *nd = getResolvedNamespace(scope); if (nd) { writeMultiLineCodeLink(ol,nd,clName); @@ -663,8 +663,8 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName, addToSearchIndex(className); if (md) { - Definition *d = md->getOuterScope()==Doxygen::globalScope ? - md->getBodyDef() : md->getOuterScope(); + const Definition *d = md->getOuterScope()==Doxygen::globalScope ? + md->getBodyDef() : md->getOuterScope(); if (md->getGroupDef()) d = md->getGroupDef(); if (d && d->isLinkable() && md->isLinkable() && g_currentMemberDef && g_collectXRefs) @@ -690,8 +690,8 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName, g_theCallContext.setClass(stripClassName(md->typeString(),md->getOuterScope())); writeMultiLineCodeLink(ol,md,clName); addToSearchIndex(className); - Definition *d = md->getOuterScope()==Doxygen::globalScope ? - md->getBodyDef() : md->getOuterScope(); + const Definition *d = md->getOuterScope()==Doxygen::globalScope ? + md->getBodyDef() : md->getOuterScope(); if (md->getGroupDef()) d = md->getGroupDef(); if (d && d->isLinkable() && md->isLinkable() && g_currentMemberDef && g_collectXRefs) @@ -703,7 +703,7 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName, } else // check namespace as well { - NamespaceDef *mnd = getResolvedNamespace(scope); + const NamespaceDef *mnd = getResolvedNamespace(scope); if (mnd) { MemberDef *md=mnd->getMemberByName(locName); @@ -713,8 +713,8 @@ static void generateClassOrGlobalLink(CodeOutputInterface &ol,char *clName, g_theCallContext.setClass(stripClassName(md->typeString(),md->getOuterScope())); writeMultiLineCodeLink(ol,md,clName); addToSearchIndex(className); - Definition *d = md->getOuterScope()==Doxygen::globalScope ? - md->getBodyDef() : md->getOuterScope(); + const Definition *d = md->getOuterScope()==Doxygen::globalScope ? + md->getBodyDef() : md->getOuterScope(); if (md->getGroupDef()) d = md->getGroupDef(); if (d && d->isLinkable() && md->isLinkable() && g_currentMemberDef && g_collectXRefs) @@ -1560,7 +1560,7 @@ static void adjustScopesAndSuites(unsigned indentLength) void parsePythonCode(CodeOutputInterface &od,const char * /*className*/, const QCString &s,bool exBlock, const char *exName, FileDef *fd,int startLine,int endLine,bool inlineFragment, - MemberDef *,bool,Definition *searchCtx,bool collectXRefs) + const MemberDef *,bool,const Definition *searchCtx,bool collectXRefs) { //printf("***parseCode()\n"); |