On 12/02/2015 09:08, Pavel Dovgaluk wrote:
>> > 
>> > This is wrong.  You have different lifetimes for different modes. Please
>> > make a copy of the event in the implementation of record mode.
> What is the correct way for cloning the QAPI type?
> I should invent the cloning visitor or just create a switch for correct 
> cloning of the InputEvent union?

You can use the existing visitors to clone objects, see
qapi_copy_SocketAddress in qemu-char.c.

Paolo

Reply via email to