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

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

 



2011/5/31 Eric Blake <eblake@xxxxxxxxxx>:
> On 05/30/2011 07:03 AM, Matthias Bolte wrote:
>> From 3bb05f7543f86e3b47772f0fabecbda4f167b3bc Mon Sep 17 00:00:00 2001
>> From: Matthias Bolte <matthias.bolte@xxxxxxxxxxxxxx>
>> Date: Mon, 30 May 2011 14:36:41 +0200
>> Subject: [PATCH] apibuild: Restrict long usage to existing functions and struct
>>
>> New APIs have to use long long instead of long.
>>
>> Also make apibuild errors fatal.
>> ---
>> Âdocs/Makefile.am | Â Â2 +-
>> Âdocs/apibuild.py | Â 74 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
>> Â2 files changed, 75 insertions(+), 1 deletions(-)
>
> Now reviewing patch 2, assuming that you go with 1B.
>
>>
>> diff --git a/docs/Makefile.am b/docs/Makefile.am
>> index 59ae685..a98f08d 100644
>> --- a/docs/Makefile.am
>> +++ b/docs/Makefile.am
>> @@ -179,7 +179,7 @@ $(python_generated_files): $(srcdir)/apibuild.py \
>> Â Â Â Â Â Â Â $(srcdir)/../include/libvirt/*.h \
>> Â Â Â Â Â Â Â $(srcdir)/../src/libvirt.c \
>> Â Â Â Â Â Â Â $(srcdir)/../src/util/virterror.c
>> - Â Â -srcdir=$(srcdir) $(srcdir)/apibuild.py
>> + Â Â srcdir=$(srcdir) $(srcdir)/apibuild.py
>
> While you're touching this line, how about we also modify it to use
> $(AM_V_GEN)
>
>> +++ b/docs/apibuild.py
>> @@ -1480,6 +1480,77 @@ class CParser:
>> Â Â Â Â Âself.signature = signature
>> Â Â Â Â Âreturn token
>>
>> + Â Â# this dict contains the functions that are allowed to use [unsigend]
>> + Â Â# long for legacy reasons in their signature and return type. this list is
>> + Â Â# fixed. new procedures and public APIs have to use [unsigend] long long
>
> s/unsigend/unsigned/ twice (copy and paste from the last patch? :)

Yes, fixed.

>> + Â Âlong_legacy_functions = \
>> + Â Â Â{ "virGetVersion" Â Â Â Â Â Â Â Â Â: (False, ("libVer", "typeVer")),
>> + Â Â Â Â"virConnectGetLibVersion" Â Â Â Â: (False, ("libVer")),
>> + Â Â Â Â"virConnectGetVersion" Â Â Â Â Â : (False, ("hvVer")),
>> + Â Â Â Â"virDomainGetMaxMemory" Â Â Â Â Â: (True, Â()),
>> + Â Â Â Â"virDomainMigrate" Â Â Â Â Â Â Â : (False, ("flags", "bandwidth")),
>> + Â Â Â Â"virDomainMigrate2" Â Â Â Â Â Â Â: (False, ("flags", "bandwidth")),
>> + Â Â Â Â"virDomainMigrateBegin3" Â Â Â Â : (False, ("flags", "bandwidth")),
>
> Same query to danpb about whether new migration v3 APIs should avoid
> 'long', and same independent patch to fix that issue.
>
>> +
>> + Â Â# this dict contains the structs that are allowed to use [unsigend]
>> + Â Â# long for legacy reasons. this list is fixed. new structs have to use
>> + Â Â# [unsigend] long long
>
> s/unsigend/unsigned/ twice
>
> ACK with the spelling nits fixed.
>

Thanks, pushed.

Matthias

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]