qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] Re: [PATCH 3/8] Add QBuffer


From: Avi Kivity
Subject: [Qemu-devel] Re: [PATCH 3/8] Add QBuffer
Date: Sat, 15 May 2010 11:49:57 +0300
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100330 Fedora/3.0.4-1.fc12 Thunderbird/3.0.4

On 05/15/2010 11:45 AM, Jan Kiszka wrote:

Instead of encoding just as a string, it would be a good idea to encode
it as something like:

{'__class__': 'base64', 'data': ...}

We've discussed using hidden properties to describe special things like
abstract classes and since we already have this namespace reserved, I
think it's a good time to use it.

The advantage is that in a dynamic language like Python, the parser can
convert base64 to binary strings automatically without having to
understand the QMP protocol.
Indeed, was amazingly simple to add and works nicely with qmp-shell as
demonstrator. Will repost, also to fix a few remaining glitches I came
across in the meantime.


Is this __class__ stuff documented anywhere?

--
Do not meddle in the internals of kernels, for they are subtle and quick to 
panic.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]