Skip to content

Commit 6de8269

Browse files
committed
issue #11120 Python variables erratic documentation
1 parent f9f6639 commit 6de8269

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/pyscanner.l

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1761,6 +1761,8 @@ static void initEntry(yyscan_t yyscanner)
17611761
yyextra->current->virt = yyextra->virt;
17621762
yyextra->current->isStatic = yyextra->isStatic;
17631763
yyextra->current->lang = SrcLangExt::Python;
1764+
yyextra->current->type.clear();
1765+
yyextra->current->name.clear();
17641766
yyextra->commentScanner.initGroupInfo(yyextra->current.get());
17651767
yyextra->isStatic = FALSE;
17661768
}
@@ -1773,7 +1775,7 @@ static void newEntry(yyscan_t yyscanner)
17731775
{
17741776
for (auto &v : yyextra->current_root->children())
17751777
{
1776-
//printf("candidate %s section=%s!\n",qPrint(v->name),v->section.to_string().c_str());
1778+
//printf("candidate %s<->%s section=%s!\n",qPrint(v->name),qPrint(yyextra->current->name), v->section.to_string().c_str());
17771779
if (v->name==yyextra->current->name && v->section==yyextra->current->section) // name is already added, don't add it again
17781780
{
17791781
if (v->doc.isEmpty() && !yyextra->current->doc.isEmpty())
@@ -1790,12 +1792,13 @@ static void newEntry(yyscan_t yyscanner)
17901792
}
17911793
if (v->type.isEmpty() && !yyextra->current->type.isEmpty())
17921794
{
1795+
//printf("copying type '%s' from '%s' to '%s'\n",qPrint(yyextra->current->type),qPrint(yyextra->current->name),qPrint(v->name));
17931796
v->type = yyextra->current->type;
17941797
}
17951798
found=true;
1799+
break;
17961800
}
17971801
}
1798-
yyextra->checkDupEntry=false;
17991802
}
18001803
if (!found)
18011804
{
@@ -2176,6 +2179,8 @@ static void parseCompounds(yyscan_t yyscanner,std::shared_ptr<Entry> rt)
21762179
yyextra->current = std::make_shared<Entry>();
21772180
initEntry(yyscanner);
21782181

2182+
yyextra->checkDupEntry = false;
2183+
21792184
QCString name = ce->name;
21802185
yyextra->commentScanner.enterCompound(yyextra->fileName,yyextra->yyLineNr,name);
21812186

@@ -2214,6 +2219,7 @@ static void parseMain(yyscan_t yyscanner, const QCString &fileName,const char *f
22142219

22152220
yyextra->yyLineNr= 1 ;
22162221
yyextra->fileName = fileName;
2222+
yyextra->checkDupEntry = false;
22172223
//setContext();
22182224
msg("Parsing file %s...\n",qPrint(yyextra->fileName));
22192225

0 commit comments

Comments
 (0)