diff options
author | José Fonseca <jfonseca@vmware.com> | 2010-11-21 02:33:38 +0000 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2010-11-21 02:33:38 +0000 |
commit | b1887f9c55f7017b795bfc4b2d9a70e45e5f1e77 (patch) | |
tree | 78beefe95dfebcf7bb28dff116daaefc5e18e3c2 /trace_parser.hpp | |
parent | b11188fcb0d2407d3b63afe86897d06aea6af567 (diff) |
Handle null more consistently.
Diffstat (limited to 'trace_parser.hpp')
-rw-r--r-- | trace_parser.hpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/trace_parser.hpp b/trace_parser.hpp index 674ee8e..565ccaa 100644 --- a/trace_parser.hpp +++ b/trace_parser.hpp @@ -111,8 +111,10 @@ public: int c; c = gzgetc(file); switch(c) { - case Trace::TYPE_BOOL: - return parse_bool(); + case Trace::TYPE_FALSE: + return new Bool(false); + case Trace::TYPE_TRUE: + return new Bool(true); case Trace::TYPE_SINT: return parse_sint(); case Trace::TYPE_UINT: @@ -133,8 +135,8 @@ public: return parse_blob(); case Trace::TYPE_POINTER: return parse_pointer(); - case Trace::TYPE_VOID: - return NULL; + case Trace::TYPE_NULL: + return new Null; default: std::cerr << "error: unknown type " << c << "\n"; assert(0); @@ -193,7 +195,7 @@ public: case Trace::TYPE_CONST: read_string(); break; - case Trace::TYPE_VOID: + case Trace::TYPE_NULL: goto done; default: std::cerr << "error: uexpected type " << c << "\n"; |