mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
fix for -O C++ construction of variable names that use multiple module namespaces
This commit is contained in:
parent
6faad5e5ca
commit
202c405a1e
1 changed files with 6 additions and 4 deletions
|
@ -111,9 +111,11 @@ string CPPCompile::LocalName(const ID* l) const {
|
|||
auto n = l->Name();
|
||||
auto without_module = strstr(n, "::");
|
||||
|
||||
if ( without_module )
|
||||
return Canonicalize(without_module + 2);
|
||||
else
|
||||
while ( without_module ) {
|
||||
n = without_module + 2;
|
||||
without_module = strstr(n, "::");
|
||||
}
|
||||
|
||||
return Canonicalize(n);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue