mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +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 n = l->Name();
|
||||||
auto without_module = strstr(n, "::");
|
auto without_module = strstr(n, "::");
|
||||||
|
|
||||||
if ( without_module )
|
while ( without_module ) {
|
||||||
return Canonicalize(without_module + 2);
|
n = without_module + 2;
|
||||||
else
|
without_module = strstr(n, "::");
|
||||||
|
}
|
||||||
|
|
||||||
return Canonicalize(n);
|
return Canonicalize(n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue