diff options
author | Benoit Foucher <benoit@zeroc.com> | 2008-04-17 18:45:01 +0200 |
---|---|---|
committer | Benoit Foucher <benoit@zeroc.com> | 2008-04-17 18:45:01 +0200 |
commit | a51597a6c13f1feb795fe3371a73953d9ac7002c (patch) | |
tree | 57a1fdcef549b07957c7e045d740760d1f481044 /cpp | |
parent | Fixed Parser.cpp assert (diff) | |
download | ice-a51597a6c13f1feb795fe3371a73953d9ac7002c.tar.bz2 ice-a51597a6c13f1feb795fe3371a73953d9ac7002c.tar.xz ice-a51597a6c13f1feb795fe3371a73953d9ac7002c.zip |
Reverted previous bogus fix.
Diffstat (limited to 'cpp')
-rw-r--r-- | cpp/include/Slice/Parser.h | 2 | ||||
-rw-r--r-- | cpp/src/Slice/Parser.cpp | 8 |
2 files changed, 3 insertions, 7 deletions
diff --git a/cpp/include/Slice/Parser.h b/cpp/include/Slice/Parser.h index f327c6dd105..2ec2f2f79e1 100644 --- a/cpp/include/Slice/Parser.h +++ b/cpp/include/Slice/Parser.h @@ -998,7 +998,7 @@ private: int _currentLine; int _currentIncludeLevel; std::string _currentFile; - bool _topLevelFileStart; + std::string _topLevelFile; std::stack<DefinitionContextPtr> _definitionContextStack; StringList _includeFiles; std::stack<ContainerPtr> _containerStack; diff --git a/cpp/src/Slice/Parser.cpp b/cpp/src/Slice/Parser.cpp index b08f2515bd2..c6816a19669 100644 --- a/cpp/src/Slice/Parser.cpp +++ b/cpp/src/Slice/Parser.cpp @@ -5095,16 +5095,12 @@ Slice::Unit::scanPosition(const char* s) if(_currentLine == 0) { - if(!_topLevelFileStart) + if(currentFile != _topLevelFile) { type = Push; line.erase(idx); eraseWhiteSpace(line); } - else - { - _topLevelFileStart = false; - } } else { @@ -5491,7 +5487,7 @@ Slice::Unit::parse(const string& filename, FILE* file, bool debug, Slice::Featur _currentLine = 1; _currentIncludeLevel = 0; _featureProfile = profile; - _topLevelFileStart = true; + _topLevelFile = normalizePath(filename); pushContainer(this); pushDefinitionContext(); |