X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fdeserializer.cc;h=8ad30591a54cb7087f788acb92c0a845b0842439;hp=4c3f8f2caab6a69cc049dc5e79affd8341c04cf6;hb=7d15b919681bb9ec0088b4b27c6abf62d6dfb9b1;hpb=0fffd0097d7b496454413e57b398c903ecc252e4 diff --git a/src/deserializer.cc b/src/deserializer.cc index 4c3f8f2..8ad3059 100644 --- a/src/deserializer.cc +++ b/src/deserializer.cc @@ -38,7 +38,7 @@ namespace dc { -class deserializer_impl +class deserializer::deserializer_impl { public: deserializer_impl(const std::string& filePath, bool comments = false, @@ -72,9 +72,9 @@ public: void throwError() { unsigned char* errorMsg = yajl_get_error(hand, 0, 0, 0); - deserializer::exception error((char*)errorMsg); + deserializer::exception problem((char*)errorMsg); yajl_free_error(hand, errorMsg); - throw error; + throw problem; } @@ -114,6 +114,7 @@ public: static int parsedBeginMap(void* ctx) { ((deserializer_impl*)ctx)->parsed.push(new wrapped_dictionary); + return 1; } static int parsedMapKey(void* ctx, const unsigned char* value, @@ -205,10 +206,13 @@ private: deserializer::deserializer(const std::string& filePath, bool comments, - bool check) : impl(new deserializer_impl(filePath, comments, check)) {} + bool check) : + // pass through + impl(new deserializer::deserializer_impl(filePath, comments, check)) {} deserializer::deserializer(std::istream& input, bool comments, bool check) : - impl(new deserializer_impl(input, comments, check)) {} + // pass through + impl(new deserializer::deserializer_impl(input, comments, check)) {} serializable_ptr deserializer::deserialize() @@ -235,9 +239,12 @@ serializable* deserializer::pullNext() void deserializer::pop() { + // pass through impl->parsed.pop(); } } // namespace dc +/** vim: set ts=4 sw=4 tw=80: *************************************************/ +