Re: [Qemu-devel] [PATCH v4 21/28] qstring: Add qstring_wrap_str()

2016-06-09 Thread Eric Blake
On 06/02/2016 09:21 AM, Markus Armbruster wrote: > Eric Blake writes: > >> Several spots in the code malloc a string, then wrap it in a >> QString, which has to duplicate the input. Adding a new >> constructor with transfer semantics makes this pattern more >> efficient, comparable to the just-a

Re: [Qemu-devel] [PATCH v4 21/28] qstring: Add qstring_wrap_str()

2016-06-02 Thread Markus Armbruster
Eric Blake writes: > Several spots in the code malloc a string, then wrap it in a > QString, which has to duplicate the input. Adding a new > constructor with transfer semantics makes this pattern more > efficient, comparable to the just-added transfer semantics to > go from QString back to raw

[Qemu-devel] [PATCH v4 21/28] qstring: Add qstring_wrap_str()

2016-05-18 Thread Eric Blake
Several spots in the code malloc a string, then wrap it in a QString, which has to duplicate the input. Adding a new constructor with transfer semantics makes this pattern more efficient, comparable to the just-added transfer semantics to go from QString back to raw string. Use the new qstring_wr