[libvirt] remote generator: Legacy support for hyper to long mappings

Matthias Bolte matthias.bolte at googlemail.com
Mon May 30 13:03:19 UTC 2011


This can be considered as a v2 for hyper annotation patch [1]. Dan
argued that hyper-to-long mapping is considered as legacy and hyper
should be mapped to long long for all new APIs. Therefore, he voted
against the longlong annotation, because this should be the default
anyway.

I removed the longlong annotations from the original patch. This
results in version-A of the attached patch 0001. But this optional
annotation makes the parser more complex. One of the reasons for
annotating things in the .x is to have single place to define a new
procedure. But as the long/longlong annotation only affect exiting
procedures and will not be added to new ones it's much simpler to
store this information in the generator itself. This information it is
fixed and will not change anymore. This is implemented in version-B of
the attached patch 0001. I favor version-B, what's your opinion on
this?

Attached patch 0002 extends the apibuild script to allow the usage of
long for the same fixed set as in the remote generator only. It
reports an error when new functions or structs use long instead of
longlong.

[1] https://www.redhat.com/archives/libvir-list/2011-May/msg01434.html

Matthias
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-remote-generator-Legacy-support-for-hyper-to-long-mappings_version-A.patch
Type: text/x-patch
Size: 27880 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110530/8a221205/attachment-0003.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-remote-generator-Legacy-support-for-hyper-to-long-mappings_version-B.patch
Type: text/x-patch
Size: 16445 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110530/8a221205/attachment-0004.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-apibuild-Restrict-long-usage-to-existing-functions-a.patch
Type: text/x-patch
Size: 6777 bytes
Desc: not available
URL: <http://listman.redhat.com/archives/libvir-list/attachments/20110530/8a221205/attachment-0005.bin>


More information about the libvir-list mailing list