[libvirt] [PATCH 04/13] remote_generator: support general dynamic array

Matthias Bolte matthias.bolte at googlemail.com
Wed May 25 19:50:11 UTC 2011


2011/5/25 Daniel P. Berrange <berrange at redhat.com>:
> On Wed, May 25, 2011 at 05:37:46PM +0800, Lai Jiangshan wrote:
>> It will allow us use "dynamic_array_basic_type member_name<MAX>"
>> for remote protocol and avoid so many manual coding.
>>
>> For avoiding ambiguity, dynamic_array_basic_type must have a "_DABT" suffix.
>>
>> Signed-off-by: Lai Jiangshan <laijs at fujitsu.com>
>
> A good idea to make the generator support more, but rather
> than requiring a magic name for the data type, add an
> annotation to the data type
>
> eg, kind of like Matthias has done to annotate 'hyper'
>
> http://www.redhat.com/archives/libvir-list/2011-May/msg01434.html

Actually there is not need for this _DABT suffix nor for any other
annotation. unsigned int keycodes<REMOTE_SEND_KEY_MAX> is just a
common pattern and the generator already deals with such arrays. I
propose the attached patch as a v2 of this patch. It doesn't try to
cover the generic array case at that isn't useful, it just deals with
[unsigned] int arrays.

This patch assumes that keycodes and keycodeslen are reordered to the
common pattern.

Matthias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-remote-generator-Handle-unsigned-int-arrays.patch
Type: text/x-patch
Size: 2386 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110525/f6db3d9a/attachment-0001.bin>


More information about the libvir-list mailing list