joncmu / rapidjson

Automatically exported from code.google.com/p/rapidjson
MIT License
0 stars 0 forks source link

Default allocator is used for GenericReader in GenericDocument::ParseStream #27

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
GenericDocument::ParseStream() does not pass custom memory allocator to 
GenericReader template in document.h:703. Proposed patch

Index: document.h
===================================================================
--- document.h
+++ document.h
@@ -700,7 +700,7 @@
    template <unsigned parseFlags, typename SourceEncoding, typename InputStream>
    GenericDocument& ParseStream(InputStream& is) {
        ValueType::SetNull(); // Remove existing root if exist
-       GenericReader<SourceEncoding, Encoding> reader;
+       GenericReader<SourceEncoding, Encoding, Allocator> reader;
        if (reader.Parse<parseFlags>(is, *this)) {
            RAPIDJSON_ASSERT(stack_.GetSize() == sizeof(ValueType)); // Got one and only one root object
            this->RawAssign(*stack_.template Pop<ValueType>(1));    // Add this-> to prevent issue 13.

Original issue reported on code.google.com by mte...@googlemail.com on 12 Jun 2012 at 10:06

GoogleCodeExporter commented 9 years ago

Original comment by milo...@gmail.com on 12 Nov 2012 at 3:59

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r76.

Original comment by milo...@gmail.com on 14 Nov 2012 at 2:50

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r77.

Original comment by milo...@gmail.com on 14 Nov 2012 at 2:53

GoogleCodeExporter commented 9 years ago
This issue was closed by revision 790b7f127cce.

Original comment by milo...@gmail.com on 6 Jun 2014 at 6:04