X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fyoink;a=blobdiff_plain;f=src%2Fdeserializer.cc;h=929c3c12183fdf3c5f10ccee3cbb6e09a7a065ea;hp=8ad30591a54cb7087f788acb92c0a845b0842439;hb=e1a8eee026993b860c557c87ec559c902a4b6a11;hpb=5e5a883d665b09cc725c9c2baaaa98703c85c30e diff --git a/src/deserializer.cc b/src/deserializer.cc index 8ad3059..929c3c1 100644 --- a/src/deserializer.cc +++ b/src/deserializer.cc @@ -120,6 +120,7 @@ public: static int parsedMapKey(void* ctx, const unsigned char* value, unsigned length) { + // same thing as a string return parsedString(ctx, value, length); } @@ -181,7 +182,9 @@ public: private: void init(std::istream& input, bool deleteIn, bool comments, bool check) { - const yajl_callbacks callbacks = + // this has to be static because yajl actually does not copy it into its + // internal data structures but rather keeps a pointer to this + static const yajl_callbacks callbacks = { deserializer_impl::parsedNull, deserializer_impl::parsedBoolean,