Re: [Qemu-devel] [PATCH 1/4] qjson: replace QString in JSONLexer with GString

2015-11-20 Thread Paolo Bonzini
On 20/11/2015 19:23, Eric Blake wrote: > On 11/20/2015 02:04 AM, Paolo Bonzini wrote: >> JSONLexer only needs a simple resizable buffer. json-streamer.c >> can allocate memory for each token instead of relying on reference >> counting of QStrings. >> >> Signed-off-by: Paolo Bonzini >> --- >> i

Re: [Qemu-devel] [PATCH 1/4] qjson: replace QString in JSONLexer with GString

2015-11-20 Thread Eric Blake
On 11/20/2015 02:04 AM, Paolo Bonzini wrote: > JSONLexer only needs a simple resizable buffer. json-streamer.c > can allocate memory for each token instead of relying on reference > counting of QStrings. > > Signed-off-by: Paolo Bonzini > --- > include/qapi/qmp/json-lexer.h| 7 +++ > i

[Qemu-devel] [PATCH 1/4] qjson: replace QString in JSONLexer with GString

2015-11-20 Thread Paolo Bonzini
JSONLexer only needs a simple resizable buffer. json-streamer.c can allocate memory for each token instead of relying on reference counting of QStrings. Signed-off-by: Paolo Bonzini --- include/qapi/qmp/json-lexer.h| 7 +++ include/qapi/qmp/json-streamer.h | 1 + qobject/json-lexer.c