Re: [libvirt] [PATCH 5/5] python: Fix generated virInterface method names

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

 



On Wed, Sep 23, 2009 at 01:01:28PM -0400, Cole Robinson wrote:
> A mistake in the generator was causing virInterface methods to be generated
> with unpredicatable names ('ceUndefine', instead of just 'undefine'). This
> fixes the method names to match existing convention.
> 
> Does anyone care if we are breaking API compat? My guess is that no one is
> using the python interface bindings yet.

Not at all - the current generated names are just plain broken.

> Signed-off-by: Cole Robinson <crobinso@xxxxxxxxxx>
> ---
>  python/generator.py |    7 +++++--
>  1 files changed, 5 insertions(+), 2 deletions(-)
> 
> diff --git a/python/generator.py b/python/generator.py
> index f87540b..b63465b 100755
> --- a/python/generator.py
> +++ b/python/generator.py
> @@ -789,10 +789,10 @@ def nameFixup(name, classe, type, file):
>          func = name[10:]
>          func = string.lower(func[0:1]) + func[1:]
>      elif name[0:15] == "virInterfaceGet":
> -        func = name[13:]
> +        func = name[15:]
>          func = string.lower(func[0:1]) + func[1:]
>      elif name[0:12] == "virInterface":
> -        func = name[10:]
> +        func = name[12:]
>          func = string.lower(func[0:1]) + func[1:]
>      elif name[0:12] == 'virSecretGet':
>          func = name[12:]
> @@ -840,6 +840,9 @@ def nameFixup(name, classe, type, file):
>          func = "OSType"
>      if func == "xMLDesc":
>          func = "XMLDesc"
> +    if func == "mACString":
> +        func = "MACString"
> +
>      return func


Daniel
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
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]